Default Versioning Settings - Number of Versions to retain

Copper Contributor

It appears that the default versioning settings for OneDrive are for 500 major versions.  Is there a way to reduce this default globally?  It doesn't appear so via the GUI but was wondering if perhaps there was a way to set this via powershell?

9 Replies

I think it is possible using a powershell script.

I did search online for powershell commands but didn't find anything to set this globally. Do you know of a cmdlet to do this?

so you have to run a script... I found it on the internet

 

Hans Brender, MVP Office Servers and Services and MODE

I was able to achieve this without a script... I had to go to classic OneDrive (bottom left of page --> Return to classic OneDrive):

capture20170719202845715.png

Next I chose the settings gear in the top O365 nav bar, and was able to choose Site settings... Go to site settings for this site.

 

capture20170719203707902.png

 

From there, under Site Administration, choose Site libraries and lists:

capture20170719203843525.png

 

...then Customize "Documents":

capture20170719204001799.png

 

You will be taken to the Documents > Settings page. Under General Settings, choose Versioning settings

capture20170719204306315.png

 

 

Under Document Version History, you can change the number of versions retained, 

capture20170719204726074.png

 

Hope that helps!

 

If you are concerned about consuming space, keep in mind this is 500 versions, but not 500 copies of the file, only changed portions of the file.  Also, using Office Online saves the file frequently and drives up the version count, as does co-authoring.  Then additionally, OneDrive only syncs the currently copy to devices.

I think that's only the case with MS Office documents, about which the infrastructure can ascertain what changes have been made.  I have a user who moved an Outlook PST file to their OneDrive folder (with good reasons at the time) and because that PST is the delivery location for an active mailbox that ended up with over 11,000 versions of the entire PST consuming all of their 1TB OneDrive storage.

Hi Thomas, we got one similar case. May I know how you delete these pst history versions to release space in onedrive? 

Facing exactly the same challenge. Users have been encouraged to use OneDrive instead of their local My Documents location, which resulted in large number of users migrating their PST and OST files to OneDrive for Business. Given Outlook constantly updates PST files their OneDrive storage is quickly being consumed by the multiple versions of the PST files. The suggested way of restricting the versions via the user interface is not relevant as it sets version settings for a specific user, not tenant wide. There is a setting now to block files in OneDrive for Business based on extension (OneDrive Admin center), but obviously there is a need to clean up files that are already there. PowerShell is the way. What a mess.

@KNIGHT LIU, Best thing to do is prevent PST sync: 

Capture.PNG
I'd like to add that when I tested today, our minimum versions to keep was 100 (Default 500)! We were hoping to set it to 2...