• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 134
  • Last Modified:

Deleting Old SharePoint Online 2013 Document Versions

I have many document libraries in SharePoint Online 2013 which is part of Office 365.  Users save hundreds of versions of very large PowerPoint files and I would like to go and delete all but the latest version from some older libraries where we no longer need a version history.  Is there a way to do this either in PowerShell or with some tool in the administrator menu?  I don't want to do it by hand.

We have a midsize business license.
0
Jason Schlueter
Asked:
Jason Schlueter
  • 2
  • 2
1 Solution
 
Jamie McAllister MVPSharePoint ConsultantCommented:
There's a script here to iterate Office 365 sites and report which has versioning turned on;

http://www.sharepointnutsandbolts.com/2013/12/Using-CSOM-in-PowerShell-scripts-with-Office365.html

This is the basis of what you need, then it depends how selective you want to be. I might adapt that to find where versioning is enabled, then switch it off, then on again. That would clear the version history and save space.

Number of versions and further logic could be built in of course.
0
 
Jason SchlueterIT ManagerAuthor Commented:
I love the idea of calling the DLLs but we have no on-prem SharePoint server so I can't get to those libraries.
0
 
Jamie McAllister MVPSharePoint ConsultantCommented:
You can do web service calls instead but it's more work.

Failing that the DLLs can be obtained from MSDN subscription or friendly consultants.
0
 
Jason SchlueterIT ManagerAuthor Commented:
Thanks for the suggestion and the blog post.  The real answer might be a policy change that will make a few managers groan.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now