Forum Discussion
Eddoria
Sep 26, 2022Brass Contributor
Set versioning limits at tenant limit
Is it possible to set tenant level for file versioning. So that by default the limit for minor and major versions are set to say 250. Currently the default seems to be 500. If it is, how is this done?
Eddoria I don't think there is any direct setting available for this at tenant level as this settings are available at library level.
You might need to use PowerShell or any other automation which will read all libraries in tenant and update versioning settings programmatically.
References:
- SharePoint Online: How to Enable Versioning on a Document Library using PowerShell?
- SharePoint Online: Set Versioning Limit using PowerShell
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.
- EarlZirkleIron ContributorHi, Yes there is! I was looking this up myself. The command set-spotenant -MajorVersionLimit will do it.
You can check your tenant's current setting by running:
Get-SPOTenant | Select-Object majorversionlimit
https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spotenant?view=sharepoint-ps- EarlZirkleIron ContributorSo I tested this in my test tenant. Say it's in private preview. Bummer!
S C:\> Set-SPOTenant -MajorVersionLimit 10
Set-SPOTenant : The requested operation is part of a feature that is in private preview and will be available when the feature becomes generally available (GA).
At line:1 char:1
+ Set-SPOTenant -MajorVersionLimit 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Set-SPOTenant], ServerException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.ServerException,Microsoft.Online.SharePoint.PowerShell.SetTenantEarlZirkle This is a new feature Microsoft adding to SharePoint to allow manual mode for SharePoint versioning settings and limits. It is still in preview phase and expected to be available globally (GA) around March 2024.
You can find more details at: https://www.microsoft.com/en-us/microsoft-365/roadmap?filters=SharePoint&searchterms=145802
Please consider giving a Like if my post helped you in any way.
- EarlZirkleIron ContributorDoes anyone know if this the majorversionlimit setting is changed, will it affect all existing SharePoint sites? I ask because this is a good way to free up SharePoint storage if it works.
Eddoria I don't think there is any direct setting available for this at tenant level as this settings are available at library level.
You might need to use PowerShell or any other automation which will read all libraries in tenant and update versioning settings programmatically.
References:
- SharePoint Online: How to Enable Versioning on a Document Library using PowerShell?
- SharePoint Online: Set Versioning Limit using PowerShell
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.