Exchange Server and Exchange Online use retention policies to group retention tags. A retention tag defines how and when Exchange should delete a mailbox object automatically or move it to the archive mailbox. Most of the time, you think of emails when talking about Exchange mailbox objects. We stay with emails for this article.
Sometimes, retention policies show an unexpected behavior, and you want to clean up the retention information from a mailbox.
To understand how to clean up the policies, we need to know the basics.
Default tags and personal tags specify what the Managed Folder Assistant should do with the emails. You assign one or more retention tags to a retention policy. You then assign the retention policy to a mailbox.
Default tags are assigned to the whole mailbox. End users can set personal tags to folders or single elements. The third tag, the default folder tag, is primarily used in delete policies.
A retention policy can have one or more default or personal retention tags. A single mailbox can only have one policy assigned.
The following screenshot shows the default retention policies for user and arbitration mailboxes, and two additional test policies.
If you want to know more about retention tags and policies, I recommend reading the Microsoft documentation.
But what exactly would we like to remove from a mailbox?
Removing a retention policy from a mailbox is simple. You replace the assigned policy with another policy, or you set the attribute to $null to remove the policy assignment. Removing or replacing a retention policy does not remove personal tags assigned to folders by the user.
If you want to remove a personal tag from a mailbox, Microsoft has the answer for you:
But what if other users in your Exchange organization also use this personal tag? Deleting a personal retention tag from the Exchange Organization will remove this tag from all mailboxes.
Supposed you have a delete policy (default tag) set on a mailbox. Also, you allow the user to exclude folders with a personal tag. Removing this personal tag for all mailboxes will lead to significant calls for your helpdesk because the Managed Folder Assistant will delete all emails from all mailboxes. Not to say that you must restore the mails.
But help is on the way. The tool RemovePersonalRetentionTag helps you cleaning up retention tags.
With this tool, you can remove one or more personal tags from the folders in a single mailbox without deleting the tag from your Exchange Organization.
You need impersonation rights for the mailbox you want to clean up. And basic authentication needs to be enabled for Exchange Online if the mailbox is an EXO mailbox. At this time, the code uses Exchange Web Services to remove retention tags.
If you want to remove all personal tags from a mailbox, it is simple:
RemovePersonalRetentionTag.exe -mailbox "user@example.com" -impersonate
If you want to remove a specific tag, you must know the retention tag id.
First, grab a list of the retention tag ids in your environment:
Get-RetentionPolicyTag -Types Personal | Select Name,RetentionId | ft -a
RemovePersonalRetentionTag.exe -mailbox "user@example.com" -impersonate -retentionid "a7966968-dadf-4df7-ae87-4482686b4634"
RemovePersonalRetentionTag.exe -mailbox "user@example.com" -impersonate -retentionid "a7966968-dadf-4df7-ae87-4482686b4634, 414c6a14-3ed5-432e-9edb-c6620a8278f0"
This tool is very useful when personal MRM policies are assigned to system folders like “Yammer.”
Am 28. Mai 2020 findet das nächste Treffen der Exchange User Group in diesem Jahr statt.
Wir treffen uns, aus gegebenem Anlass, online. Das Meetup findet als Microsoft Teams Meeting statt.
Die Anmeldung zur unseren Meetup ist hier möglich: https://www.meetup.com/de-DE/EXUSG-DE/events/266646042/.
Wir sehen uns.
Meine Präsentation Exchange Hybrid – Was ist das? Warum brauche ich das? Wie geht das? ist bei SlideShare verfügbar.
Am 27. & 28. Mai 2020 findet der Microsoft 365 Virtual Marathon statt.
Während des 36-stündigen Marathons finden durchgehend Sessions statt, deren Speaker auf der ganzen Welt verteilt sind. Du kannst jederzeit mitmachen.
Die virtuelle Konferenz ist kostenlos und findet in Zusammenarbeit mit der SharePoint Conference NA.
Meine Session beim Microsoft 365 Virtual Marathon ist zum Thema:
Die vollständige Agenda findest du hier: http://www.m365virtualmarathon.com/sessions.html
Viel Spaß!
Adnan Rafique is a Collaboration Architect for Microsoft Exchange and Office 365. He is a subject matter expert in this area since the days of Exchange Server 2007.
He reached out to me to record an interview on Office 365, the impact of cloud technologies to the daily operations of IT administrators, and the requirement for life-long learning.
Here is the recording, available on Adnan's YouTube Channel. Enjoy.
Video-Link: https://go.granikos.eu/iMentorCloudFeb2020
A future interview will cover Microsoft Teams and how it helps to transform the way your work.
Am 23. Januar 2020 findet das erste Treffen der Exchange User Group in diesem Jahr statt.
Wir treffen uns in den Räumlichkeiten der COMPAREX AG.
Die Anmeldung zur unseren Meetup ist hier möglich: https://www.meetup.com/de-DE/EXUSG-DE/events/266646039/.