Everything you need to know about Intelligent Versioning in Microsoft 365
Table of contents
During the Microsoft Build conference in May, Microsoft quietly released the public preview of its new Enhanced Version Controls functionality, previously referred to as Intelligent Versioning in the Microsoft 365 Roadmap. This is one of the many features Microsoft has recently released to help organizations save storage space and costs related to storage in Microsoft 365. In this blog post, we will explore how you can utilize it.
Why the focus on reducing storage costs?
In the past decade, organizations have saved up a ton of data, and according to IDC, by 2025, there will be more than 130 billion terabytes of content in the world. In Microsoft 365, many customers are starting to reach their pooled storage limits and are faced with a difficult project of analyzing all their data to find what they could get rid of or pay for extra storage. One easy way to reduce costs, however, is removing versions of files that we might not need anymore.
Something that many users and administrators forget is that version history is now turned on by default with every document library that you create. Mix that with features like Auto-Save on Office documents, and many organizations are now using a ton of storage just to have 200 versions of the same file. Luckily, the new Intelligent Versioning setting in SharePoint Online can help.
Enhanced Version Controls/Intelligent Versioning in SharePoint Online
While versions in SharePoint Online have always been (and still are) a very powerful feature, as administrators, we never had the controls we needed to manage them at scale. It was also difficult to find the right balance between keeping too many versions and disposing of old ones. Luckily, Microsoft just released a new way for administrators to manage versions inside their tenants. Let’s dive into how it works.
Enabling the preview
To access the preview, you first need to turn it on via PowerShell using the PowerShell cmdlet. If you receive an error message stating that the EnableVersionExpirationSetting parameter does not exist, you must update the SharePoint Online PowerShell module to the latest version.
Set-SPOTenant -EnableVersionExpirationSetting $true
After that is done, from the SharePoint Admin Center, you will have a new option for SharePoint version history limits in the Settings tab.
Once you navigate to the page, you will have to select whether you want to use the Microsoft-recommended Automatic way to manage versions or the Manual way. It’s really important to note that the settings you configure here are tenant-wide but only apply to new OneDrive accounts and new SharePoint document libraries. They will not change anything for any existing OneDrive accounts and SharePoint Libraries.
Let’s first dig deeper into the Automatic method that Microsoft recommends. Automatic limits are based on the principle that the restorability value of versions reduces as they age. Automatic setting uses an algorithm to gradually thin out versions as they age while storing versions at key timestamps. This offers your users access to file versions over a wide time range and optimizes version storage use. Here is how automatic works:
- In the first 30 days, all versions within 500 count limit are stored,
- For the next 30 days, hourly versions are stored,
- After the 180-day mark: Daily versions are stored,
- Beyond 180 days: Weekly versions are stored indefinitely.
The manual option is more straightforward and is either based on time or number of versions, or both. There is one limitation you need to know about: the User Interface doesn’t allow a value of less than 100 major versions or less than 30 days expiration time limits to be set. Still, it’s possible to set the system to store fewer versions using public APIs. Microsoft does have a warning that any value less than 100 versions or less than 30 days expiration time limit isn’t recommended and can result in the user activity causing an inadvertent data loss.
This is how Microsoft compares the options between:
- Count only which provides a maximum of restore option, at the cost of a high storage space.
- Expire and Count, which provide limited restore options – but a low-cost usage.
- The none in this case is because if, for example, you set all versions to expire after one year, well after one year all versions will be deleted, so you will not have any versions to restore to.
- Automatic, which provides an optimized balance of both.
To help you choose, here is an example scenario from Microsoft. Take an example of a file where 500 versions were created in May, June, and July. Let’s compare the versions available under each version limits:
- Manual limits: 500 major versions with an expiration of 60 days: No more than 500 versions are stored, and any version older than 60 days is also deleted. On this file, all versions are eventually deleted as the versions age.
- Manual limits: 500 major versions with no limits: All versions within the count limit of 500 continue to be stored.
- Automatic limits: Under automatic settings, older versions are trimmed intermittently over time, resulting in a 96% reduction in version storage in a six-month period compared to count limits. Users always have access to a set of versions even when no new file edit activity exists.
Here is a view of what would happen in each in table format:
As well as in a graph format below.
Now remember that so far, we have only looked at the tenant-level settings, which apply to new libraries and documents only—what about existing sites or sites that have different requirements?
Microsoft offers the ability to break the inheritance of versioning settings at the site and library levels. You can break inheritance for each site, and then all the libraries will, by default, take the site policy instead of the tenant policy. You can view a nice representation in the picture from Microsoft below.
Breaking inheritance on a site can be done using the Set-SPOSite cmdlet. For example, if you wanted to configure existing document libraries on a site to have a maximum of 200 versions and expire after 180 days, you would use the following cmdlet.
Set-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 200 -ExpireVersionsAfterDays 180 -ApplyToExistingDocumentLibraries
To only apply it to new libraries but not existing ones, use the -ApplyToNewDocumentLibraries switch parameter instead of ApplyToExistingDocumentLibraries.
To change the setting at the library level, you can either use the user interface (Library settings > Versioning) seen in the screenshot below or the Set-SPOListVersionPolicy PowerShell cmdlet, as in the example below, where we set the maximum limit to 100 versions and the maximum retention to 30 days.
Set-SPOListVersionPolicy -Site https://contoso.sharepoint.com/sites/site1 -List "Documents" -EnableAutoExpirationVersionTrim $false -MajorVersionLimit 100 -ExpireVersionsAfterDays 30
Now that you have successfully configured all your settings, it’s important to remember that those settings will only apply to new versions of documents, and the settings have no impact on existing document versions—for example, a library with version expiration settings updated from Never Expire to Expire after six months. The new version created will expire after six months. However, there is no impact on versions that already existed before the setting. This is because the expiration is set on the version at version creation.
To run a clean-up job on existing versions, you need to run the New-SPOSiteFileVersionBatchDeleteJob PowerShell cmdlet. For example, to delete all versions older than 360 days in all document libraries in a specific site, you would run:
New-SPOSiteFileVersionBatchDeleteJob -Identity https://contoso.sharepoint.com/sites/site1 -DeleteBeforeDays 360
Some things to be aware of when you run a trim on existing files:
- The expire trim mode always deletes all versions created before January 1, 2023. If you want to trim versions, you can’t keep any older than that. This is a Microsoft limitation.
- Versions deleted using trimming jobs are permanently deleted. This deletion workflow bypasses the normal recycle bin retention, and deleted versions cannot be recovered.
Finally, something interesting you might want to do is run reports or a what-if analysis, and Microsoft provides some great guidance on this on Microsoft Learn.
- Run ‘What-If’ analysis on version storage report file: https://learn.microsoft.com/en-us/sharepoint/tutorial-run-what-if-analysis?WT.mc_id=M365-MVP-5000399
- Generate and analyze version usage report for SharePoint site: https://learn.microsoft.com/sharepoint/tutorial-generate-version-usage-report?WT.mc_id=M365-MVP-5000399
Closing thoughts on Enhanced Version Controls
Many organizations are now looking at ways to reduce storage inside their tenant. Versioning in SharePoint Online, although a powerful tool, contributes to increasing storage costs. Microsoft has now released Enhanced Version Controls in Public Preview, and organizations can start using it to reduce old versions and SharePoint storage.
Microsoft offers three different ways for organizations to manage versions: either Automatic, which uses a Microsoft algorithm to optimize storage and restore options, or allows you to manually configure the number of versions or time to keep them. While this new feature is quite powerful, it also requires a lot of PowerShell configuration. It does not have a way to create advanced rules (for example, only keep two versions for videos, but for everything else, keep 50).
How to do it better – Automated versioning limits
Syskit Point provides significant benefits for managing SharePoint storage with its automated versioning limits feature. Here’s how it works.
Automation rules enable continuous enforcement of version cleanup, eliminating the need for ongoing manual work. You can set conditions based on metadata to automatically apply versioning limits to new workspaces, ensuring consistent storage management regardless of how or when the site was created.
The automated versioning limits make the cleanup process more efficient, avoiding the need for complex PowerShell scripts or site-by-site adjustments. This simplifies management and saves time. With versioning limits and governance rules in place, storage consumption is optimized automatically and continuously. This reduces the risk of data accumulation and keeps your storage organized.
You can apply versioning limits tenant-wide or per site and create custom limits to fit your needs. This flexibility allows for tailored storage management across multiple sites with just a few clicks.
Also, Syskit Point’s detailed reporting gives you a clear view of storage growth trends, helping you understand and manage your storage more effectively. In combination with enforced policies, you’re enabled to make timely decisions to manage storage efficiently.