DEV Community

Jaime López
Jaime López

Posted on • Originally published at intranetfromthetrenches.substack.com

Optimizing SharePoint Versioning: A Practical Guide for Administrators

This is the second article in our series on mastering document versioning in SharePoint Online. In the first article, Mastering Document Versioning in SharePoint Online: A Guide for Administrators, we explored the fundamentals of versioning, its impact on storage, and best practices for balancing collaboration with efficiency. Now, we will take a more practical approach, focusing on how to modify SharePoint versioning settings to align with your organization’s needs.

Managing versioning is more than just turning a setting on or off. It requires thoughtful configuration to prevent storage overload, maintain performance, and ensure that document history remains useful without unnecessary clutter.

In this guide, we will cover two primary ways to modify versioning settings in SharePoint Online:

  • SharePoint UI – The user-friendly method for configuring versioning at the document library and tenant levels.
  • PowerShell – A powerful tool for bulk updates and automation to enforce policies across multiple sites and libraries.

By the end of this guide, you’ll be able to implement versioning policies that enhance collaboration while maintaining control over storage and document history.

Modifying Versioning Settings via SharePoint UI

The SharePoint Online UI provides an intuitive way to configure versioning settings at both the tenant and document library levels. Administrators can use the SharePoint Admin Center to set global policies, while site owners and contributors can modify versioning at the library level.

Updating Tenant Versioning Settings via SharePoint Admin Center

Tenant-wide versioning settings apply to all SharePoint sites, including Microsoft 365 Groups and Teams-connected sites. Follow these steps to configure versioning at the tenant level:

  1. Sign in to the SharePoint Admin Center.
  2. In the left navigation pane, select Settings.
  3. Scroll down to Version history limits.
  4. Choose one of the following options:
    • Automatically manage version history - Microsoft automatically removes unnecessary versions to optimize storage.
    • Manually manage version history - Allows administrators to define custom limits.
  5. If selecting Manually manage version history, configure:
    • Number of major versions to retain (between 100 and 50,000).
    • Time before versions are deleted (between 29 days and 100 years).
  6. Click Save to apply the changes.

Updating Tenant Versioning Settings via SharePoint Admin Center

Updating Versioning Settings via SharePoint Document Library

At the document library level, site owners and contributors can customize versioning settings to fit their specific needs. Follow these steps to modify versioning in a SharePoint document library:

  1. Navigate to the SharePoint site containing the document library.
  2. Open the document library where you want to configure versioning.
  3. Click on the Settings (⚙️) icon in the top-right corner.
  4. Select Library settings.
  5. Under General Settings, click Versioning settings.
  6. Configure the following options:
    • Versioning Type:
      • Major versions only – Saves full versions (e.g., 1.0, 2.0).
      • Major and minor versions – Saves both major and minor versions (e.g., 1.1, 1.2, 2.0).
    • Retention Settings:
      • Automatic – Microsoft manages version retention.
      • Manual – Allows you to set a version count limit to avoid excessive storage use.
  7. Click OK to save the changes.

Updating Versioning Settings via SharePoint Document Library

Modifying Versioning Settings Using PowerShell

PowerShell provides a powerful way to configure versioning settings across a SharePoint Online environment. Administrators can use PowerShell to apply settings at the tenant, site, and document library levels, ensuring consistent management of version history and storage.

Common PowerShell Parameters for Versioning Management

When configuring versioning using PowerShell, several key parameters are used across all levels. Some parameters are mandatory, while others are optional and depend on the use case:

  • EnableAutoExpirationVersionTrim (mandatory) – Enables or disables automatic version expiration management by SharePoint.
  • MajorVersionLimit (mandatory if EnableAutoExpirationVersionTrim is set to $false) – Defines the maximum number of major versions to retain.
  • MajorWithMinorVersionsLimit (optional) – Determines how many minor versions are stored alongside major versions.
  • ExpireVersionsAfterDays (mandatory if EnableAutoExpirationVersionTrim is set to $false) – Specifies the retention period for older versions before deletion.
  • ApplyToNewDocumentLibraries (optional, site-level only) – Ensures newly created document libraries inherit versioning settings.
  • ApplyToExistingDocumentLibraries (optional, site-level only) – Ensures existing document libraries inherit versioning settings.
  • InheritVersionPolicyFromTenant (optional, site-level only) – The new document libraries will use the Tenant Level setting. It won't impact the existing document libraries.

Managing Versioning at the Tenant Level with Set-SPOTenant

When it comes to managing versioning settings across your entire SharePoint Online environment, the Set-SPOTenant PowerShell cmdlet is your go-to tool. This command allows tenant administrators to configure versioning policies that apply globally, ensuring consistency and control over how document versions are retained or trimmed. One of the standout features of this cmdlet is its ability to toggle automatic version management or define specific retention rules.

PowerShell example for retrieving and updating SharePoint Online tenant versioning settings

Managing Versioning at the Site Level with Set-SPOSite

PowerShell provides a powerful way to manage versioning settings at the site level in SharePoint Online, offering administrators granular control over how versions are handled across a site collection. The Set-SPOSite cmdlet is the cornerstone of this process, allowing you to configure versioning policies efficiently.

In addition to setting these policies, PowerShell offers tools to monitor and manage the application of versioning changes. The Get-SPOSiteVersionPolicyJobProgress cmdlet is particularly useful for tracking the progress of versioning policy updates across existing document libraries in the site collection. This is especially handy in large environments where changes might take time to propagate.

If you need to halt an ongoing versioning policy update—perhaps due to a misconfiguration or a change in requirements—the Remove-SPOSiteVersionPolicyJob cmdlet comes into play. This command cancels further processing of the versioning settings update, giving you flexibility to adjust your approach without committing to unintended changes.

PowerShell example for retrieving and updating SharePoint Online site versioning settings

Managing Versioning at the Library Level with Set-SPOListVersionPolicy

While site-level versioning settings provide a broad framework, SharePoint Online also allows you to fine-tune versioning at the library level using the Set-SPOListVersionPolicy cmdlet. This approach is ideal when specific document libraries require unique versioning rules that differ from the site-wide configuration. With this cmdlet, you can tailor version management to meet the needs of individual libraries, ensuring flexibility and precision.

This level of control is particularly useful in scenarios where different teams or projects rely on the same site but have distinct versioning requirements. For instance, a legal team might need longer retention periods for compliance, while a marketing team might prefer shorter cycles to optimize storage.

By using Set-SPOListVersionPolicy, you can ensure that each library’s versioning settings align with its specific purpose, striking a balance between accessibility, compliance, and storage efficiency. Whether you opt for automated management or a bespoke configuration, PowerShell empowers you to manage library-level versioning with ease and accuracy.

PowerShell example for retrieving and updating SharePoint Online library versioning settings

Best Considerations and Tips When Configuring Versioning in SharePoint Online

Configuring versioning settings at the tenant, site, and library levels in SharePoint Online requires a thoughtful approach to balance functionality, storage efficiency, and compliance. Below are five practical tips and considerations to guide administrators in optimizing versioning policies effectively.

Tip 1: Assess Organizational Needs Before Setting Policies

Before diving into PowerShell scripts or tenant-wide settings, evaluate your organization’s requirements. Consider factors like regulatory compliance, document lifecycle, and team workflows. For example, legal departments might need extensive version histories for auditing, while creative teams might prioritize fewer versions to streamline collaboration. Tailor tenant, site, and library settings to reflect these needs rather than applying a one-size-fits-all approach.

Tip 2: Leverage Automation Wisely with EnableAutoExpirationVersionTrim

The EnableAutoExpirationVersionTrim parameter (available in both Set-SPOSite and Set-SPOListVersionPolicy) can save time and storage by automating version cleanup. However, use it judiciously. Enable it for libraries with high document turnover (e.g., project drafts), but disable it and set manual limits for critical repositories where retaining specific versions is essential. Always test the impact in a sandbox environment first to avoid unintended data loss.

Tip 3: Balance Version Limits with Storage Quotas

Versioning can quickly consume storage, especially with generous limits for major and minor versions. When setting MajorVersionLimit and MajorWithMinorVersionsLimit, align them with your tenant’s storage capacity. For instance, setting a high MajorVersionLimit (e.g., 50) in a library with frequent updates might balloon storage usage. Monitor usage reports in the SharePoint Admin Center to ensure your settings don’t push you over your quota.

Tip 4: Use Site-Level Settings as a Baseline, Library-Level for Exceptions

Establish a consistent versioning policy at the site level using Set-SPOSite to simplify management across the site collection. Then, use Set-SPOListVersionPolicy to tweak individual libraries that require exceptions. For example, set a site-wide policy of 10 major versions expiring after 90 days, but adjust a contracts library to retain 20 versions indefinitely. This layered approach reduces administrative overhead while accommodating special cases.

Tip 5: Monitor and Adjust Policies Over Time

Versioning needs evolve as your organization grows. Regularly review settings using Get-SPOSiteVersionPolicyJobProgress to check policy application status and assess their effectiveness. If storage costs rise or user feedback highlights issues (e.g., too few versions retained), refine parameters like ExpireVersionsAfterDays or version limits. Schedule periodic reviews—quarterly or biannually—to keep policies aligned with current demands.

Conclusion

Managing document versioning in SharePoint Online enhances collaboration while keeping storage optimized. Administrators can configure versioning through the SharePoint UI for simplicity or use PowerShell for automation and bulk updates.

Proper versioning policies ensure a balance between usability and performance:

  • Tenant-level settings apply across all SharePoint sites and should align with company policies.
  • Site-level settings offer flexibility, allowing teams or projects to tailor versioning to their needs.
  • Library-level settings provide granular control for document libraries with unique retention requirements.
  • PowerShell automation simplifies version management, especially for large organizations.
  • Regular monitoring and adjustments help maintain an optimal balance between collaboration and storage limits.

With well-planned versioning policies, administrators can turn SharePoint versioning into a powerful asset rather than a storage burden. Thoughtful management improves efficiency and prevents unnecessary data accumulation.

References

Top comments (0)