Home > Work > OneDrive for Business – Configurable Retention Period for Orphaned OneDrives!

OneDrive for Business – Configurable Retention Period for Orphaned OneDrives!

Hello again! It’s a well-known fact in On-Premise SharePoint world that ever since SharePoint 2010, My Site Clean Up Timer Job is set up 14 days before the MySite is deleted, and there’s nothing you can do about that other than disable the timer job and/or write your own timer job. Matter of fact, I recall countless SP conferences recommending you disable this timer job and handle retention via custom process where you have more visibility and control. In SharePoint Online world, this was changed to 30 days and if you’re like me and have corporate retention policies that are longer than 30 days, you would have to go thru series of workarounds to extend the retention period by leaving the Office 365 account active one way or another.

Well let me tell you that the days of that for SharePoint Online are gone now! I was surprised to see that the May 2016 release of the SharePoint CSOM (v 16.1.5312.1200) introduced ad new property called OrphanedPersonalSitesRetentionPeriod that allows you to get or set the default retention days to OneDrive for Business sites. Even better, the values can be set between 30 to 3650. That’s measured in DAYS! Which means max value is 10 years!!

I’m glad Microsoft has added this option as it now gives a lot of flexibility for organizations to ensure OneDrive retention meets their corporate retention policies.

Easiest way to change the retention is via SharePoint Online PowerShell commands:
…and you can download the latest SharePoint Online PowerShell from here

#Connect to SharePoint Online Admin (change URL to your SPO tenant Admin URL)
Connect-SPOService -Url http://bit.ly/2bkvM95-Credential (Get-Credential)

#Set Retention period – change the value of ‘3650’ to value you prefer
Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod 3650

#Run the following command to confirm value has been applied
(Get-SPOTenant).OrphanedPersonalSitesRetentionPeriod

Here are some links to where you can find out more about this:

Good luck!

The post OneDrive for Business – Configurable Retention Period for Orphaned OneDrives! appeared first on blog about technology….

from blog about technology… http://bit.ly/2bkvHCr

Jin Kang
I am an ECM Solutions Architect with over 7 years of experience envisioning, architecting, and implementing enterprise solutions using various technologies including Azure, Office 365, and SharePoint.

Currently I work at ConocoPhillips, providing problem resolution capabilities for systemic environment faults and outages, assist with automating and improving operational process, and collaborate with Operations and Support teams to evaluate, design, and introduce technologies to solve real business problems. I also provide subject matter expertise support to customers.

This article has been cross posted from jinkang.us (original article)

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: