Showing posts with label retention. Show all posts
Showing posts with label retention. Show all posts

Microsoft 365 Retention Policy shows "Exchange: 1 distribution result(s) found - Notify Support"

Thursday, September 3, 2020

Microsoft 365 retention policies are configured from Policies in the Microsoft 365 Compliance Center (https://compliance.microsoft.com). You can create retention policies to keep and or delete data in Exchange email, SharePoint sites, OneDrive accounts, Office 365 Groups, Skype for Business, Exchange Public Folders, and Teams channel messages and chats.

When setting up a new retention policy it defaults to configure a policy for Exchange email, SharePoint sites, OneDrive accounts, and Office 365 Groups.


As of this writing, separate retention policies are required for Microsoft Teams data.

If you select Exchange Public Folders but you don't have them in Exchange Online, the policy will show an error saying, "1 distribution result(s) found". The Exchange location has the details, "Recipient not found" and the Action will say, "Notify support".


This isn't a very helpful error message. "Recipient not found" means that the policy couldn't locate the Public Folders mailbox. 

To fix this, simply edit the policy to not include Exchange Public Folders and save it. The policy status will change to "On (pending)" while the change is replicated through all the services. In a short while the status will change to "On (success)".


Read more ...

Don't Delete or Rename the Default MRM Policy

Wednesday, October 28, 2015
I was troubleshooting an issue with an Exchange 2013 customer where their "Default Archive and Retention Policy" was not being automatically applied to archive-enabled mailboxes. Admins could manually apply the policy, but they wanted it applied automatically when the mailbox is enabled for an in-place archive or Exchange Online Archiving.

It turns out that the only retention policy that will be automatically applied is one named "Default MRM Policy". That name is hard-coded into the product, so if you delete it all you need to do is recreate it with that same name to make it the default policy. There is no property for that policy that makes it the default. It's just the name.

Here's some of the back story. Exchange 2007 introduced Managed Folders, which was an early form of retention management, but it was rather clumsy to work with. Exchange 2010 SP1 and later uses message records management (MRM) policies and policy tags. MRM policies are collections of policy tags that tell Exchange server how manage mail data. Some tags apply by default, such as the "Default 2 year move to archive" tag. Others are personal tags that users can chose to apply to one or more mail items, or entire folders, such as "1 Year Delete". Exchange setup creates the "Default MRM Policy" which includes a default set of policy tags.


The Default MRM Policy does not actually apply to any mailboxes by default, unless the the mailbox is given an archive mailbox. At that time, Exchange looks for an MRM policy named, "Default MRM Policy" and automatically applies it to the mailbox. If the Default MRM Policy does not exist, no retention policy is applied.


If you want to apply a different MRM policy you need to manually update the retention policy in the EAC (Mailbox User > Mailbox Features < Retention Policy - see above) or from EMS:
Set-Mailbox <username> -RetentionPolicy "Sales Dept MRM Policy"
For hybrid customers and those using Exchange Online Archiving, you manage MRM policies for on-prem mailboxes on-prem. The policy settings for these mailboxes will sync to Exchange Online with the DirSync process and will be applied to the online archive mailbox.

If a user mailbox and archive mailbox are both in the cloud, you will apply the cloud version of the Default MRM Policy in Office 365. Here, you should configure the Office 365 version of the Default MRM Policy to match the same settings as on-prem.

Read more ...

How to Create Dynamically Adjusting Exchange Retention Policies

Friday, May 29, 2015
Exchange has supported message retention policies since Exchange 2010. Retention Policies are collections of Retention Tags that dictate how emails are retained in Exchange. Usually this is done to comply with business policies on data retention and/or used as a way to move data from the user's primary mailbox to an archive mailbox.

Retention Policies
The retention policy shown above includes several personal policy tags and one default policy tag that moves emails older than 6 months to the archive. You can customize or create new retention policies for your users based on your company's data retention policies. For example, you can create a retention policy to move all emails to the archive mailbox after 1 year and permanently delete all emails older than 5 years.

Only one mailbox retention policy can be assigned to a mailbox at a time. While you can easily change which retention policy is assigned to a mailbox using the the Exchange Management Shell or the Exchange Admin Center, this can be somewhat tedious.

Note that retention tags are time-based, not size-based. If you're trying to manage your mailbox storage with retention policies the same time-based retention policy may result in widely varying mailbox sizes within the Exchange database store, depending on the user. I developed the following process to dynamically adjust user's retention policy based on mailbox size. The larger the mailbox gets, the more aggressive the retention policy applied.

Start by creating multiple default archive and/or delete retention tags. Make sure to select "applied automatically to entire mailbox (default)" to ensure that it applies to all email items. For example,

  • Default one year move to archive
  • Default 6 months move to archive
  • Default 3 months move to archive
  • Default 7 year delete
  • Default 5 year delete
  • Default 3 year delete
Creating a Default retention tag
Next create multiple retention policies that include the default retention tags you created. For example,
  • High Retention - Default one year move to archive, Default 7 year delete
  • Medium Retention - Default 6 months move to archive, Default 5 year delete
  • Low Retention - Default 3 months move to archive, Default 3 year delete
Apply the High Retention policy to all mailboxes using the following EMS command:
Get-Mailbox -ResultSize unlimited | Set-Mailbox -RetentionPolicy "High Retention"

Note that archive retention tags only apply if the mailbox has an archive mailbox, otherwise the archive tags are ignored.

Copy the following script and save it to one of your Exchange servers in the C:\Scripts folder as Apply-RetentionPolicies.ps1:
$mbx = Get-Mailbox -ResultSize unlimited
$mbx | ForEach-Object -Process {
$size = ( Get-MailboxStatistics $_.Alias ).TotalItemSize
If ( $size -gt "10GB" ) {
  Set-Mailbox $_.Alias -RetentionPolicy "Low Retention Policy"
  }
elseif ( $size -gt "8GB" ) {
  Set-Mailbox $_.Alias -RetentionPolicy "Medium Retention Policy"
  }
else {
  Set-Mailbox $_.Alias -RetentionPolicy "High Retention Policy"
  }
}

Adjust the mailbox sizes in the script to meet your company's retention needs. In the example script above mailboxes greater than 10GB get the Low Retention Policy, mailboxes between 8-10GB get the Medium Retention Policy, and everyone else gets the High Retention Policy.

Next, create a scheduled task that runs the Apply-RetentionPolicies.ps1 script once per day.

Set the "Program/Script" property to:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
And set the "Add arguments (optional)" to:
-NonInteractive -WindowStyle Hidden -command $ep = (Get-Item env:"ExchangeInstallPath").Value; . $ep\bin\RemoteExchange.ps1; Connect-ExchangeServer -auto; . C:\Scripts\Apply-RetentionPolicies.ps1
Creating a Basic Scheduled Task
The scheduled task must run using the credentials of an account with Organization Management rights.

With this process, as a mailbox gets smaller from a more aggressive retention policy it will automatically get a longer retention policy.

Read more ...