ShareMaster is shaped by your feedback. Tell us what to build next →
  1. Home
  2. Guides
  3. Bulk change library settings

How to Bulk Change SharePoint Library Settings Across Sites

SharePoint Online has no single screen that changes library settings across many sites. Microsoft's own tools each cover a slice. Library settings changes one library at a time. The admin centre's Version history limits page only shapes libraries created after you save it. Site-level PowerShell can push version limits into existing libraries, but nothing native sets Require Check Out, content approval or draft security in bulk. For those you either loop PnP PowerShell over every site, or use a tool that runs the loop for you.

Which route is right depends on which settings you need to change, so start there.

Which tool changes which library setting?

Setting Library settings page Admin centre org limit Set-SPOSite per site Set-PnPList loop
Versioning on or off, major or major and minor One library No No Yes
Major version count One library New libraries only New and existing Yes
Version time limit (automatic or days) One library New libraries only New and existing Yes
Require content approval One library No No Yes
Draft item security One library No No Yes
Require Check Out One library No No Yes

Microsoft says as much in its own documentation: the organisation-level limit handles document library version limits only, and major and minor versions, list versioning and content approval have to be configured on the individual library or list.

One library at a time: the Versioning settings page

Every setting in the table lives on a single page. In the library, open the gear menu, choose Library settings, follow More library settings, then select Versioning settings. You will find four groups there: content approval, document version history (with the count and time limits), draft item security, and Require Check Out.

For five libraries this is fine. For five hundred across eighty sites it is a week of clicking, and nobody can prove afterwards that every library got the same answer. That is the job the rest of this page is about.

Version limits: what the admin centre and Set-SPOSite really reach

Version limits are the one setting Microsoft does give you tenant and site controls for, and the scope of each is narrower than it looks.

  • Organisation level. In the SharePoint admin centre, go to Settings, then Version history limits, and pick Automatically or Manually. Manual takes between 100 and 50,000 major versions and an optional expiry. It applies to new libraries only, can take up to 24 hours to show up on them, and Microsoft states plainly that pushing the organisation limit into existing libraries is not supported.
  • Site level. PowerShell only. Set-SPOSite with -EnableAutoExpirationVersionTrim, -MajorVersionLimit and -ExpireVersionsAfterDays, plus -ApplyToExistingDocumentLibraries or -ApplyToNewDocumentLibraries, sets limits for one site. Existing libraries are updated asynchronously, which Microsoft says can run for up to 24 hours; track it with Get-SPOSiteVersionPolicyJobProgress.
  • Neither one trims. A new limit does not delete history that already exists. That takes a separate trim job, covered in trimming SharePoint version history.

Choosing the right count or expiry is its own decision, and setting a version limit per library walks through it. This page treats the version limit as one setting among six.

Bulk change library settings with PnP PowerShell

Set-PnPList exposes the rest: -EnableVersioning, -EnableMinorVersions, -MajorVersions, -MinorVersions, -EnableModeration (content approval), -DraftVersionVisibility (Reader, Author or Approver) and -ForceCheckout, and current versions add -EnableAutoExpirationVersionTrim and -ExpireVersionsAfterDays for time limits. Wrap it in two loops, one over sites and one over libraries:

$appId = "<your Entra ID app client id>"
Connect-PnPOnline -Url "https://contoso-admin.sharepoint.com" -Interactive -ClientId $appId
$targets = Get-PnPTenantSite | Where-Object { $_.Url -like "*/sites/proj-*" }

foreach ($site in $targets) {
    Connect-PnPOnline -Url $site.Url -Interactive -ClientId $appId
    $docLibs = Get-PnPList | Where-Object { $_.BaseTemplate -eq 101 -and -not $_.Hidden }
    foreach ($lib in $docLibs) {
        Set-PnPList -Identity $lib.Id -EnableModeration $false -ForceCheckout $true `
            -DraftVersionVisibility Author
        "{0} | {1}" -f $site.Url, $lib.Title
    }
}

Three things catch people out with this approach:

  1. You need your own app registration. The shared PnP Management Shell app was removed on 9 September 2024, so every script now signs in through an Entra ID app registered in your tenant (Register-PnPEntraIDApp creates one).
  2. Access is per site. The account has to reach every site in the loop. The SharePoint Administrator role lists the sites; it does not by itself let you open each one, so expect access-denied rows unless you add yourself as a site admin first and remember to remove yourself afterwards.
  3. Subsites are separate webs. The loop above visits the top site of each collection. Libraries inside subsites need a third loop.

Checking and changing library settings in ShareMaster

ShareMaster does not sweep a setting across every library in the tenant; for that, use the loop above. What it does is make each change easier to find and check, one site or one list at a time:

  • Easy Settings puts every tenant, site and list setting ShareMaster can write behind one search box. Search by the setting's name, its API property or the problem you are having, see its current value, and change it.
  • List Explorer shows every list and library on a site with its settings, including versioning and views, so you can check the result of a script run library by library.
Note: Whichever route you use, change one test site first and confirm each value before you touch the rest. Turning on content approval in a library people are using changes how they save and who sees new files the same day, so tell site owners before you do it.

Frequently Asked Questions

Does changing the organisation version history limit update existing libraries?

No. Microsoft documents that the organisation-level setting applies to libraries created after the change, can take up to 24 hours to reach them, and does not update existing libraries. For those, set limits per site with Set-SPOSite and -ApplyToExistingDocumentLibraries, or per library.

Can I turn on Require Check Out for every library at once?

Not from the SharePoint admin centre. Its version history controls cover version limits only, and Require Check Out is set library by library. Loop Set-PnPList -ForceCheckout over the libraries, as in the script above, and spot-check a few libraries afterwards.

Does lowering a version limit delete old versions straight away?

Changing a limit does not run a trim of the history that already exists. Clearing it needs a separate trim job or a version trimming tool. When SharePoint does delete versions over a library's limit, they bypass the recycle bin and cannot be restored from it, so decide on the number before you apply it everywhere.

Can ShareMaster change every library at once?

No. Easy Settings and List Explorer change settings one site or one list at a time. For a change across many libraries, use the PnP PowerShell loop above, then check the results in List Explorer.

What to do next

Before you standardise version limits, find out which libraries are carrying the most history so you know what the new limit will cost or save: a storage report by library shows where it sits.

Try ShareMaster free for 14 days

Last updated