Problem:
Microsoft’s classic ECM is acting all funky and you can’t create retention tags or policies without an error.
Solution:
(h/t That Lazy Admin)
How to create Retention Tags and Policies using Powershell
Connect to Exchange Powershell using the Quick Connect script Here: https://gallery.technet.microsoft.com/Connect-To-Office-365-9b235018?redir=0
Run the following command to get the current Retention Tags and Policies Get-RetentionPolicy
1 | Get-RetentionPolicy |
And Then Get-RetentionPolicyTag
1 | Get-RetentionPolicyTag |
Now let’s continue and create the following Retention Tag
- Name: Managers Deleted Items
- Delete and Allow Recovery set to 180 days
New-RetentionPolicyTag -Name Managers-Deleted-Items -RetentionAction DeleteAndAllowRecovery -AgeLimitForRetention 180 -Type DeletedItems
12 | New-RetentionPolicyTag -Name Managers-Deleted-Items -RetentionAction DeleteAndAllowRecovery -AgeLimitForRetention 180 -Type DeletedItems |
New-RetentionPolicy -Name Keep-Deleted-Items-Management -RetentionPolicyTagLinks Managers-Deleted-Items
12 | New-RetentionPolicy -Name Keep-Deleted-Items-Management -RetentionPolicyTagLinks Managers-Deleted-Items |