Forum Discussion
Changing number of versions to keep
CaptainReboot As per the documentation Set-SPOTenant, you can set the maximum major version limit at tenant level.
But, you might get an error while using EnableAutoExpirationVersionTrim parameter in commands some times as it is still an experimental feature and might not be available for your SharePoint tenant yet.
Microsoft will be releasing some new features related to this parameter and version history in November 2023 and then GA will be around March 2024.
Till then you might need to do version limit changes for individual libraries using PowerShell if above parameter does not work for your tenant.
Yes, newest 100 versions will be kept and older versions will be deleted. You can change the number of versions to keep as per your company/project requirements. 50-100 versions might be enough for some customers and some customers might want to keep more than those.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Thanks for this information.
If setting this, will static retention still take precedent.
I'm trying to clean up 100's of sites, which we have all libraries set to 101 versions.
We have 1000's of files with over 1000's of versions due to the 2 - 7-year retention (depending on site) takes precedence over the version limit.
Currently have to take each site of retention, and run a script, but then MS throttling gets involved, meaning several passes are needed...