-
Notifications
You must be signed in to change notification settings - Fork 0
Home
GitHub Action edited this page Mar 3, 2026
·
8 revisions
SPSCleanVersions is a PowerShell script tool to clean Version History in your SharePoint Tenant. Optimize your storage costs by managing major and minor versions across libraries and lists.
-
Single JSON Input: All configuration is passed via a single
-InputJsonstring parameter, ensuring full compatibility with Azure Automation Runbooks. -
Simulation Mode: Use
"DryRun": truein the JSON (or-WhatIflocally) to preview changes safely. - Flexible Retention: Define custom thresholds for major and minor versions.
-
Multi-Site Processing: Pass multiple Site Collection URLs in the
SiteUrlsJSON array to process them in a single execution. -
Force Delete Old Versions: Set
"ForceDeleteOldVersions": trueto trigger a batch delete job viaNew-PnPSiteFileVersionBatchDeleteJob. Requires delegated user context (automatically skipped in Azure Automation). - Azure Automation Ready: Single string parameter avoids all runbook type limitations (arrays, switches, booleans).
For details on usage, configuration, and parameters, explore the links below:
Navigation
Project