Exchange Online (MS365) - Create Exchange MRM Policies & Tags
Managing email retention in a busy organization can feel like herding cats. Between regulatory compliance, mailbox limits, and users who love to keep everything, it’s easy for things to spiral out of control.
Enter Microsoft Purview. Sure, it’s got a fancy name and sounds like something from a sci-fi movie, but it’s essentially Microsoft’s compliance hub where you can create and manage email retention rules.
In this guide, I’ll Walk you through setting up Messaging Records Management (MRM) policies and tags for Exchange Online. No promises it’ll make your job more fun, but at least your emails will be well-behaved.
What Are MRM Retention Tags and Policies?
Before we dive in, let’s decode Microsoft’s jargon. As usual, they’ve given simple concepts unnecessarily complicated names:
- MRM Retention Tags: These tell Exchange what to do with emails. Think of them as the rules—delete this, archive that, let this one live forever (well, almost).
- MRM Retention Policies: A collection of retention tags bundled together into one neat package you can slap onto user mailboxes.
Step 1: Get to the Microsoft Purview Portal
First, we’re heading to the Purview portal. If you’re wondering why it’s called “Purview” instead of something straightforward like “Retention Center,” join the club. Either way, here’s how you find it:
- Log in: Go to the Microsoft Purview Compliance Portal.
- Navigate: Click Solutions > Data Lifecycle Management > Exchange (Legacy).
Step 2: Create an MRM Retention Tag
Tags are the building blocks of retention policies. They dictate what happens to emails and when.
Here’s how you create them:
- Go to MRM Retention Tags: In Purview, head to MRM Retention Tags.
- Click New Tag: Hit + New tag and get ready to channel your inner compliance wizard.
- Choose the Tag Type:
- Automatically to entire mailbox (default): Applies to all emails, no exceptions. Perfect for the “I don’t trust users” crowd.
- Automatically to default folder: Apply to specific folders like Inbox or Deleted Items.
- By users to items and folders (personal): Let users apply tags manually. Bold move, but you do you.
- Set the Retention Settings:
- Retention Period: Pick how long emails should live (e.g., 365 days).
- Retention Action:
- Delete and allow recovery: Like putting emails in the recycling bin.
- Permanently delete: Gone forever—no backsies.
- Move to archive: Sweep them into the archive to free up mailbox space.
- Name the Tag:
- Give it a name like "1-Year Retention" or “Delete This Trash.”
- Save: Click Submit and pat yourself on the back.
Step 3: Create an MRM Retention Policy
Now that you’ve got tags, it’s time to bundle them into a policy. Think of it as creating the "playlist" of retention rules.
- Go to MRM Retention Policies: Navigate to MRM Retention Policies in Purview.
- Create a New Policy: Hit + New policy.
- Add Tags: Select the tags you created earlier and toss them into the policy.
- Name the Policy: Something snappy like "7-Year Retention Policy" or “The Great Email Purge.”
- Save: Click Submit, and voila—your policy is ready to deploy.
Step 4: Assign the Policy to Mailboxes
Time to unleash your masterpiece on unsuspecting mailboxes.
- Open the Exchange Admin Center: Yep, Purview doesn’t let you assign the policies directly. Why make it easy, right? Head over to the Exchange Admin Center.
- Go to Mailboxes: Navigate to Recipients > Mailboxes.
- Assign the Policy:
- Select a mailbox.
- Click Manage Retention Policy.
- Choose your shiny new policy and hit save.
Repeat for other mailboxes or use the PowerShell script below if you’re allergic to repetitive clicking.
Automating Policy Assignment with PowerShell
Let’s face it—assigning policies manually is for the birds. Here’s a PowerShell script to do the heavy lifting:
# Connect to Exchange Online
Connect-ExchangeOnline -UserPrincipalName "admin@yourdomain.com"
# Assign a retention policy to all user mailboxes
$mailboxes = Get-Mailbox -RecipientTypeDetails UserMailbox
foreach ($mailbox in $mailboxes) {
Set-Mailbox -Identity $mailbox.PrimarySmtpAddress -RetentionPolicy "YourRetentionPolicyName"
}
# Disconnect from Exchange Online
Disconnect-ExchangeOnline
Tips for Success (and Sanity)
- Start Small: Test your policies on a few mailboxes before rolling them out org-wide. No one wants to explain why all the CEO’s emails vanished overnight.
- Educate Users: If you’re allowing personal tags, make sure users know how to use them. Otherwise, they’ll end up calling you.
- Review Regularly: Retention policies aren’t “set it and forget it.” Compliance requirements change, and so should your policies.
- Blame Microsoft: When users complain about retention rules, just shrug and blame the big blue logo. It works.
I reckon that...
Creating MRM policies and tags in Microsoft Purview is a bit of a dance, but once you’ve got it set up, it’s smooth sailing. Sure, Microsoft could’ve streamlined some of this (like assigning policies directly in Purview), but hey, where’s the fun in that?
Got any war stories or tips for managing retention policies? Drop them in the comments—I’d love to hear how you’re navigating the chaos.