As you may already know, SharePoint Online (and OneDrive for Business too) offers a document versioning capability, which is enable by default, to help you keep track of document updates and – optionally – recovers from user errors or malware recovery.
This versioning capability is included in your SharePoint storage consumption, while most of the time the impact on storage is limited as the versioning feature just save the modification (such as for Office files), in other case it saves the full file (such as for PDF, ISO or other document type which does not support differential saving) which can increase your storage consumption.
Well, good news as the SharePoint Online versioning capability is being improved to be more intelligent and provide a centralized configuration.
This improved version capability is currently being deployed across tenants, with an expected completion date set to late June 2024.
To enjoy this new capability, you will need to enable it on your tenant using the latest SharePoint Online PowerShell module (available for download from Download SharePoint Online Management Shell from Official Microsoft Download Center).
To enable it, run the below commands to connect to your SharePoint Online tenant and enable the new versioning capability:
- Connect-SPOService -Url https://<your tenant>-admin.sharepoint.com
- Set-SPOTenant -EnableVersionExpirationSetting $true
NOTE if you are getting an error (“The requested operation is part of an experimental feature that is not supported in the current environment”) when running the Set-SPOTenant this is because the feature is not yet available on your tenant
After enabling the version expiration setting, a new option will become available on your SharePoint Online administration portal to centrally manage versioning settings across your tenant
You will have the options to either let SharePoint Online manage your versioning (Automatically – recommended) or manually define the number of version to keep and when to delete them
Once enabled, the Versioning settings for the document library will look like this; still letting end-users to adjust if needed
Existing libraries will need to be be updated from No time limit to Automatic if needed