Saturday, March 11, 2017

How to Increase the OneDrive for Business retention and deletion from 30days to 3650days (10 Years)

    I am sure we may have come across this scenario were the customer wants more than 30Day for deleted user OneDrive for Business. The OneDrive Clean Up Job runs, and the user profile is marked for deletion. The profile will be preserved in the database in a deleted state. The default retention period is 30 days but this value can be modified by using the -OrphanedPersonalSitesRetentionPeriod parameter for the Set-SPOTenant cmdlet in the SharePoint Online Management Shell.   


    • From the Start button, choose All Programs, search for SharePoint Online Management Shell  and then Right click on "SharePoint Online Management Shell" and select run as an administrator

    • Run Connect-SPOService. For example, type this command at the prompt:
    For e.g. Connect-SPOService -Url https://contoso-admin.sharepoint.com -credential admin@contoso.onmicrosoft.com  (Press Enter)
    Where URL is the URL of the SharePoint Online Administration Center
    Credential is the user name for Global admin

    • Run the Below Command
    Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod 3650   (Press Enter)

    • Once you press the enter button  you will get the message
    Are you sure you want to perform this action?
    This will update the Retention Policy for All Orphaned OneDrive for Business sites.

    • Click  on "Yes" to update the  update the Retention Policy for All Orphaned OneDrive for Business sites.
    Run the Below Command
    Set-SPOTenant -OrphanedPersonalSitesRetentionPeriod 3650   (Press Enter)

    • Once you press the enter button  you will get the message
    Are you sure you want to perform this action?
    This will update the Retention Policy for All Orphaned OneDrive for Business sites.

    Click  on "Yes" to update the  update the Retention Policy for All Orphaned OneDrive for Business sites.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Search Box