Forum Discussion
Change the SharePoint Online version limit on the Organization level
Inside this official documentation @ https://learn.microsoft.com/en-us/sharepoint/version-overview seems we can define the version limits on the Organization, sites & libraries. levels
where if we need to change the setting from :-
to this settings on the organization level:-
this effect will only get reflected to new libraries inside existing sites and new sites. but this will not affect existing libraries and also version extra than 100 on existing documents or ones created more than 10 years..
but on the site level, we seems have more control to reflect the changes on all the existing libraries and trim the extra versions using power shell scripts. but doing so will make the site to have unique setting from the Org.
so to be able to achieve what we are looking for by changing the SharePoint Online version limit on the Organization level and have the effect on all the new/existing sites, new/existing libraries and remove additional versions, can we do the following??:-
- Change the setting from the Org level to be 100 instead of 500, and define Time deletion limit
- then define this setting on each site separately + apply the trim script to each site.
- After that to re-force the site to re-inherit this setting back from the org?
on paper this should work, but can anyone advice if there is a shorter approach to follow? and how?
3 Replies
- grant_jenkinsIron Contributor
I realise this was posted a little while ago but just wanted to point out that I'd be cautious using the Time deletion option on existing libraries across your tenant (assuming you were planning to run the PowerShell scripts available for this purpose).
If you have a lot of older files (in your case older than 10 years), it will remove ALL version history on those which could cause issues with compliance and legal requirements. There may be cases where there is a requirement to keep certain data forever, or at least longer than 10 years.
I'm not sure if you've already done this, but if it were me, I'd be checking with your data governance and legal teams beforehand.
- BarbarurBrass Contributor
By default the sites inherit the versioning limit from the tenant.
Editing the versioning limit on existing libraries doesn’t stop the site from inheriting versioning limits from the tenant for new libraries.
this is just for clarification. But yes, you can perfectly follow your plan to ensure correct setup, in case any other admin of your organization changed the limits at some point before.
- DaxtonRiverIron Contributor
1. Using SharePoint Admin Center: Login to Microsoft 365 Admin Center and navigate to SharePoint > Active Sites.
Select the set of sites for which you want to change the version limit and click on Policies > Version Control.
Adjust the limits for the number of Major and Minor versions.
2. Using a PowerShell script: Run the following script to change the version limits:
powershell
Connect-SPOService -Url https://yourdomain-admin.sharepoint.com
Set-SPOSite -Identity https://yourdomain.sharepoint.com/sites/yoursite -VersioningEnabled $true -MajorVersionLimit 100 -MinorVersionLimit MinorVersionLimit 100 -MinorVersionLimit 50
Replace https://yourdomain.sharepoint.com/sites/yoursiteMajorVersionLimit and MinorVersionLimit with the desired versioning limits.
3. Check Storage Quota: In SharePoint Admin Center, check the storage quota for the site set.
If the storage quota is close to the limit, you may need to increase the quota to support more versions.
4. Contact Microsoft Support: If none of the above methods work, it is recommended to contact the Microsoft Support team with detailed error messages and screenshots for further assistance.