Troubleshooting Retention Policies in Exchange Online

By February 23, 2023Microsoft Exchange

[ad_1]

There are two types of retention policies: Exchange Online Retention policies and the Compliance Retention policies. In this two-part article series, I provide suggestions and tactics to help you troubleshoot both. In this post (Part 1), I delve into Exchange Online Retention Policies and identify issues that you may encounter. In Part 2, I discuss Compliance Retention policies and how to troubleshoot them.

You may not need them all, but in this article, I cover several useful troubleshooting steps.

Always start by using Start-ManagedFolderAssistant to begin processing mailboxes. While this can take up to 7 days in Exchange Online, it’s important to start at the beginning and work to identify and fix the root cause. Also, if a problem does exist, it may be resolved after the Managed Folder Assistant (MFA) processes the mailbox.

A mailbox will not be processed if it is less than 10 MB in size or if no retention policy is assigned to it.

First determine which policy is assigned to the mailbox by running the following command:

 

Get-Mailbox <Identity> | fl InPlaceHolds, Retention*, ELC*

 

01mrm01.jpg

The Retention Policy applied to this mailbox, “Default MRM Policy,” should be reviewed. Ensure that ELcProcessingDisabled is set to its default value of False, as this property prevents the MFA from processing the retention policy and other functions. Also, confirm that Retention hold is not enabled (False), as this will only prevent expiring items in folders from being visible to the user, but not in the Recoverable Items folder. For more information on Retention tags, policies and holds, see Retention tags and retention policies in Exchange Online.

After reviewing the retention policy, determine which Retention tags have been assigned to the mailbox and what their actions are by running the following commands:

 

Get-RetentionPolicy -Identity “Default MRM Policy” | select -ExpandProperty retentionpolicytaglinks
$tags = Get-RetentionPolicy -Identity “Default MRM Policy” | select -ExpandProperty retentionpolicytaglinks
$tags | foreach {Get-RetentionPolicyTag $_ | ft Name, Type, Age*, Retention*}

 

01mrm02.jpg

The output above provides details about the retention policy applied to the mailbox, such as the types of included tags, the actions taken on items at a certain age, and the age limit for retention. It is important to evaluate the relevance of these tags to your mailbox and identify the default retention tag (DRT) applied to it.

To ensure the MFA processes the mailbox, run the following command after verifying that policies and tags have been correctly applied to the mailbox:

 

Start-ManagedFolderAssistant -Identity <User>

 

Again, the processing time in Exchange Online can be up to 7 days.

If you recently made changes to a mailbox’s retention policy, use the -FullCrawl parameter to recalculate the entire mailbox:

 

Start-ManagedFolderAssistant -Identity <User> -FullCrawl

 

This parameter, which is available only in Exchange Online, will recalculate the application of tags throughout the entire mailbox.

Check the value of ELCLastSuccessTimestamp to verify that the MFA correctly processed the mailbox by running the following command:

 

$MRMLogs = [xml] ((Export-MailboxDiagnosticLogs <user> -ExtendedProperties).mailboxlog)
$MRMLogs.Properties.MailboxTable.Property | ? {$_.Name -like “*ELC*”}

 

01mrm03.jpg

­The output will show the number of deleted or archived items that MRM processed last time as well as the time stamp of the last successful run.

To further check for any MRM exceptions, run the following command:

 

Export-MailboxDiagnosticLogs <identity> -ComponentName MRM

 

If any errors are returned, such as “Resource ‘DiskLatency (GUID:… Name:??? Volume:…) is unhealthy and should not be accessed” or “Resource ‘Processor’ is unhealthy and should not be accessed,” determine the frequency of the error. If it has not occurred for more than two days, re-run the MFA. If the issue persists or has occurred for more than two days, contact Microsoft support. Additionally, you may want to review the compliance retention policy section of the relevant documentation.

If the previous steps do not resolve the issue of the mailbox quota not being reduced, it may be necessary to check the mailbox folder statistics to identify the root cause of the problem. You can use the following command to gather information on the number of items, oldest item, and top item in the inbox folder:

 

Get-MailboxFolderStatistics <User> -FolderScope inbox -IncludeOldestAndNewestItems -IncludeAnalysis | select name, items*, oldes*, top*

 

01mrm04.jpg

If any item is larger than 150 MB, there will be a problem moving it to the archive, and you will have to move it manually or delete it. Also note that the maximum number of objects per folder is one million. If any folder reaches the 1 million item limit, nothing will be transferred to that folder. This is common for the Inbox, and when this happens, the ELC Assistant produces an error.

For example, a big item, like in the previous example, may cause the mailbox to stop processing, in which case you must manually move the item to the archive or delete it. Similarly, with the 1 million item restriction, you must manually reduce the number of items in the folder to allow MRM to handle the mailbox again.

That’s it for Part 1. In Part 2, I discuss troubleshooting Compliance Retention policies.

Mustafa Nassar
Exchange Support Engineer

[ad_2]
Source link

Share this post via

Leave a Reply