Change SharePoint Default Versioning
For SharePoint Online administrators managing large environments, keeping track of storage usage is crucial to maintaining performance and controlling costs. One key factor contributing to storage consumption is document versioning. By default, SharePoint Online keeps up to 500 major versions of each document, and with frequent updates, this can quickly add up.

In this guide, we will explain why it’s essential to limit document versioning across your entire SharePoint Online environment and provide a step-by-step walkthrough on how to apply these limits using SharePoint Online Management Shell or PowerShell. This will help you ensure optimal performance and reduce storage costs across all your sites.
Why Limit Document Versioning Across the Entire Environment?
As a SharePoint Administrator, managing document versioning across the entire environment provides several benefits:
Reducing Storage Costs
- Storage Allocation: SharePoint Online comes with limited storage based on your Microsoft 365 subscription. Versions of documents count towards your storage quota, so limiting them can help avoid additional storage purchases.
- Cost Efficiency: By controlling the number of versions stored, you reduce the need for extra storage, keeping costs manageable.
Consistent Governance
- Version Limits Across Sites: Applying a standard versioning limit across all sites ensures a consistent governance approach to data management.
- Compliance: Certain regulations and organizational policies may require limiting the number of versions stored to comply with retention policies.
Simplifying Document Management
- Fewer Versions to Manage: Limiting versions makes document management easier for users and admins, ensuring that only relevant changes are kept.
- Performance Improvement: Fewer versions per document reduce the load on document libraries, improving performance and retrieval speeds.
Default Versioning Settings in SharePoint Online (Updated for 2026)
This is the part most guides get wrong, because Microsoft changed it. New document libraries now default to Automatic version limits, also called intelligent versioning, rather than the flat 500-version cap that used to apply.
Under Automatic, SharePoint thins out older versions on a schedule instead of keeping every one:
- All versions created in the first 30 days, within a 500-version count limit.
- Hourly versions (the version at the top of each hour) between 30 and 60 days.
- Daily versions (the first of each day) between 60 and 180 days.
- Weekly versions beyond 180 days, kept indefinitely until the 500-version maximum is reached.
Microsoft reports that automatic limits cut version storage by roughly 94 to 96% over six months compared with fixed count limits, while still giving users the recent versions they actually restore from.
The three modes available to you are therefore:
| Mode | What it keeps | Best for |
|---|---|---|
| Automatic (default for new libraries) | Thinned by age, up to 500 | Most content, lowest admin effort |
| Manual - count limit | A fixed number of versions regardless of age | Predictable behaviour on version-critical libraries |
| Manual - count plus expiration | Versions within the count, deleted past an expiry period | Lowest storage footprint, but files not edited for a long time can lose all versions |
Why this still matters for storage. Every version is stored in full, not as a delta, so a heavily edited file consumes many times its own size. Libraries created before the change, or set to a manual count limit, can still accumulate hundreds of full-size copies per document, exhausting your storage allocation and pushing you into paying Microsoft's overage rate for space you did not plan to buy.
How to Limit Versioning for All Sites in SharePoint Online
As an admin, you can set versioning limits across your SharePoint Online tenant using PowerShell. This will apply the changes globally to all existing document libraries, ensuring consistency and helping reduce storage costs.
Prerequisites
- Permissions: You must be a SharePoint Online Admin or Global Admin to make changes across your environment.
- Tools Needed: You’ll need to have SharePoint Online Management Shell or PowerShell installed.
Step-by-Step Guide to reduce SharePoint Online Document Versions
Step 1: Install and Connect to SharePoint Online PowerShell
- Open PowerShell on your machine.
- Install the SharePoint Online Management Shell (if you haven’t already):
powershell
Install-Module -Name Microsoft.Online.SharePoint.PowerShell - Connect to SharePoint Online:
powershell
Connect-SPOService -Url https://<your-domain>-admin.sharepoint.comReplace<your-domain>with your actual domain.
Step 1a: Decide Between Automatic and Manual Limits
If you simply want the recommended behaviour everywhere, set Automatic as the organisation default for new libraries rather than scripting count limits:
Set-SPOTenant -EnableAutoExpirationVersionTrim $true
That applies to newly created libraries. Existing libraries keep whatever they are set to, which is why the manual steps below still matter for an established tenant.
Step 2: Get All Sites in Your Tenant
To make changes across all document libraries in SharePoint Online, first retrieve a list of all site collections in your tenant:
$sites = Get-SPOSite -Limit All
Step 3: Iterate Through Each Site and Set Versioning Limits
You can loop through each site and set versioning limits for each document library. In this example, we’ll limit the number of major versions to 10 across all document libraries.
foreach ($site in $sites) \{
# Get all document libraries in the site
$libraries = Get-PnPList -Web $site.Url | Where-Object {$_.BaseTemplate -eq 101}
foreach ($library in $libraries) \{
# Set the version limit to 10 major versions
Set-PnPList -Identity $library -MajorVersions 10
Write-Host “Versioning set to 10 for library $($library.Title) in site $($site.Url)”
}
}
- Explanation: The script loops through each site, retrieves the document libraries, and sets the number of major versions to 10.
- 101: This refers to document libraries specifically.
Step 4: Run the Script Once your script is ready, run it in PowerShell. The script will apply the new versioning settings to all document libraries across your SharePoint Online environment.
Step 5: Verify the Changes You can verify that the versioning settings were applied by visiting any document library and checking the versioning settings:
- Go to any site collection in SharePoint.
- Navigate to Site Contents > Library Settings > Versioning Settings.
- Ensure that the version limit is set to 10.
Alternative Solution:
Use Squirrel for Archiving Documents and Versions
Another alternative for managing document versions across a SharePoint Online environment is to use Squirrel, a document archiving solution that moves documents (along with their versions) to more cost-effective Azure Blob Storage. Squirrel retains the full version history and metadata without consuming SharePoint storage, reducing both costs and complexity.
With Squirrel, you don’t need to worry about storage limitations in SharePoint Online. The system allows users to rehydrate files on demand, making document restoration easy while keeping all versions intact. This provides a scalable solution for organizations with extensive document histories that need to maintain large archives efficiently.
Frequently Asked Questions
How many versions does SharePoint keep by default?
New document libraries default to Automatic version limits, which keep all versions for the first 30 days, then progressively thinner sets (hourly to 60 days, daily to 180 days, weekly beyond that) up to a maximum of 500 versions. The older flat default of 500 major versions still applies to libraries created before the change or explicitly set to a manual count limit. Every save, edit or metadata change creates a version, and each is stored in full.
How many versions does SharePoint keep after I change the limit?
Whatever number you set. The version limit is configurable per document library, per site, or tenant-wide via SharePoint Online Management Shell. Most large enterprises set the limit between 10 and 50 versions for standard content and higher values only for genuinely version-critical libraries.
Do older versions get deleted automatically when the limit is exceeded?
Broadly yes, but not instantly. Once a document exceeds the configured count limit, SharePoint trims older versions as new ones are created rather than purging everything at once - roughly 20 versions are removed per file update until the library is back within the limit. Files that are never edited again keep their full history indefinitely, which is why lowering a limit does not reclaim storage on dormant content.
How much storage do SharePoint versions consume?
Each version is stored in full, not as a delta - so a 50 MB Word document with 100 versions consumes roughly 5 GB. In tenants with active retention policies, all versions are also copied into the Preservation Hold Library, which can silently double or triple the effective consumption.
Does reducing the version limit delete existing versions retroactively?
No. Reducing the limit only affects future save actions. Existing over-limit versions remain until a new version pushes them off the end of the queue, so a library full of untouched documents keeps every version it already has. To reclaim that space you have to queue a version trimming job - New-SPOSiteFileVersionBatchDeleteJob at site level or New-SPOListFileVersionBatchDeleteJob at library level - and those deletions are permanent and bypass the recycle bin, so run a What-If analysis first. The full method is in SharePoint version history storage: find and reduce it. The alternative to deleting recovery points is archiving the files, versions intact, with Squirrel.
Conclusion
For SharePoint Online administrators, managing versioning limits across the entire environment is critical to controlling storage costs, improving performance, and ensuring governance consistency. By using SharePoint Online Management Shell or PowerShell, you can efficiently apply versioning limits to all sites and document libraries.
Alternatively, solutions like Squirrel can help you archive documents and their versions outside of SharePoint, providing cost-effective, long-term storage while keeping all version histories intact.
Additional Resources
- Microsoft Documentation:
- Related guides on this site:
- SharePoint version history storage: find and reduce it - trimming existing versions and reclaiming the space.
- How to reduce SharePoint Online storage - where version history fits in the wider cleanup.
- Squirrel Solution:
- Learn more about how Squirrel can help you manage document versioning and archiving across SharePoint Online.
Reducing SharePoint Storage Costs Doesnt Have to be Hard
Reducing SharePoint storage costs is easy with Squirrel, which seamlessly archives documents and versions to cost-effective Azure storage.

Save on SharePoint storage costs with Squirrel, the seamless solution for archiving documents and retaining version history in Azure.
Want to Reduce SharePoint Costs?
Mark Smith co-founded SmiKar Software in 2015 and has spent the past decade helping organisations solve Microsoft 365 data management challenges. He works with the SmiKar team to build solutions for SharePoint archiving, storage optimisation, governance and compliance, supporting customers from growing businesses through to Fortune 500 enterprises.
More about SmiKar


