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
Here are some links to where you can find out more about this:
- SharePoint CSOM release (May 2016) – http://bit.ly/2b00Qaw
- SharePoint Online PowerShell command (Set-SPOTenant) – http://bit.ly/2bkwhQw
- How User Profiles are deleted in SPO and OneDrive for Business – http://bit.ly/2b00MHP
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