Forum Discussion
AMS-DavidJParkes
May 14, 2024Copper Contributor
Delete Version History
Hello Team, I'm looking for help with deleting the version history of specific files in SharePoint, but retaining the last 10 versions. I can see that I can manually delete the version history, b...
Paul de Jong
May 14, 2024Iron Contributor
Using PowerShell is one approach. Find a PowerShell script that deletes all version apart from x last versions and then add additional constraint for your specific file. It does require coding and some basic testing of course.
Another approach is to use 3rd party Apps that offer this functionality in the browser. i.e. delete all versions and keep x last versions. See https://www.slimapplications.com/wp-content/uploads/2020/07/Document-Versions.jpg.
- AMS-DavidJParkesMay 14, 2024Copper ContributorHello Paul,
Thank you for your response. I've looked at New-SPOSiteFileVersionBatchDeleteJob, but I cannot run this in my tenant as it is experimental. Is there a command you would recommend i could start with?