Forum Discussion
Iamdavidc
Apr 18, 2024Copper Contributor
Disable OneDrive Retention Policy for One User Account
We have one OneDrive default retention policy for all staff in M365. We have one user, because of the work they do, has one file that is rewritten many times during the day which creates an incredib...
Andrew Geddes
Apr 18, 2024Copper Contributor
Iamdavidc Best way to do this is via PowerShell. How familiar are you with PS and commands? Here's the script you're going to run to remove the user from the 'All' policy:
Set-RetentionCompliancePolicy -Identity "Policy-Name" -AddOneDriveLocationException "https://tenant-name-my.sharepoint.com/personal/user_domain_com/"
You'll replace Policy-Name with the name of your policy and the url with the user's OneDrive url. If you need detailed PS instructions let me know and I can get the list together. Hope this helps!
Iamdavidc
Apr 19, 2024Copper Contributor
Andrew Geddes Thank you for the assist. I am going to give this a try as soon as I am back in the office. I don't work with PowerShell scripts often but I think I am familiar enough to follow your suggestion. I will write back either way. Thanks again.