There are a lot of reasons why your new retention policy might not run for some users, i have listed a bunch of reasons why the mailbox might be on some sort of hold or different retention that might cause the MRM not to run.
Hold will prevent the retention and archive polices to run.
Placing a mailbox on retention hold suspends the processing of an MRM retention policy by the Managed Folder Assistant for that mailbox. Retention hold is designed for situations such as a user being on vacation or away temporarily.
Check for holds on the mailbox.
1 |
get-mailbox -Identity username|fl *hold* |
Example of how it should look:
If the “RetentionHoldEnabled” is true then change it to false to allow archiving for the mailbox as per the Retention Policies configured.
1 |
Set-Mailbox "user@domain.com" -RetentionHoldEnabled $false |
To Check the Retention Policy and Retention Hold Value for all the Mailboxes you can use the command below.
1 |
Get-Mailbox -ResultSize unlimited | Where-Object {$_.RetentionHoldEnabled -eq $true} | Format-Table Name,RetentionPolicy,RetentionHoldEnabled -Auto |
Longest retention will always win.
Check that the correct retention policy has been applied to the mailbox. If you have some retention applied by another policy that exceeds the one you’re trying to apply, the longest will always win.
1 |
get-mailbox -Identity username | fl RetentionPolicy |
User can override default polices by applying “Personal Retention Tags” directly to their folders within outlook. This can be extremely frustration to find and troubleshoot.
Below command will check all the mailbox folders for a specific user and look for individual tags added by them.
1 |
Get-MailboxFolderStatistics -Identity %USERNAME% | where {$_.ArchivePolicy} |Select-Object identity, ArchivePolicy, FolderSize, itemsinfolder |
By default the MRM polices will try to run within 7 days of enabling the policies.
You might be too quick to expect the moving and deleting of files to start happening.
You can force the MRM to run by using the following command. (Might take 24 hours)
1 |
Start-ManagedFolderAssistant -identity "user@domain.com" |
Script to check the current status of the archive live within PowerShell ISE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
do { $Primary = Get-EXOMailboxStatistics -Identity %USERNAME% $Archive = Get-EXOMailboxStatistics -Identity %USERNAME% -Archive $report = [PSCustomObject]@{ #DisplayName = $Primary.DisplayName PrimarySize = $Primary.TotalItemSize ArchiveSize = $Archive.TotalItemSize PrimaryItemCount = '{0:N0}' -f $Primary.ItemCount ArchiveItemCount = '{0:N0}' -f $Archive.ItemCount } $livereport = [array]$report $livereport sleep 120 } while ($true) |
Output example
As seen on the screenshot the archive is slowly increasing in size while the primary is slowly decreasing.
Check oldest item within all folders of the users primary mailbox.
You might be thinking the policy is not working, but in fact it is there are just not any older folders available in the mailbox.
1 |
Get-EXOMailboxfolderStatistics -Identity %USERNAME% -IncludeOldestAndNewestItems | Select-Object identity, ItemsInfolder, foldersize, OldestItemReceivedDate | Sort-Object itemsinfolder -Descending |
Output example
eDiscovery hold
This will prevent all MRM to run on mailbox because there is a hold on the mailbox.
Check if you see any eDiscovery cases which includes the user in the case, otherwise you can run the script below.
Create a report on holds in eDiscovery cases – Microsoft 365 Compliance | Microsoft Docs
If you have any questions / feedback or would like to correct me on any of the stuff above, please use the comment section or contact me directly using the blue button in the bottom right corner.
Excellent article. Retention tag not working for single user: pesky personal retention tag was the culprit!
Thank you for sharing. Very helpful article.
I have created a retention policy for some users but it hasn’t applied after more than a week. Do I need to create an archive mailbox for these users, could that be the reason it isn’t working?
Hi Dai,
If you’re using the archiving feature, you need to enable the In-place archive for each mailbox. If you are using the deletion of old emails, then something is holding or blocking it from running.
Thanks for sharing. Helped me to understand some things.
Thanks for sharing! It’s a very elucidating article!
thank you! its really helpful!