Master & Cmd-R

RetentionHoldEnabled Inconsistency

I ran into an issue today where we discovered that a subset of our users with mailboxes that had been migrated to Office 365 had Retention Hold enabled on their mailboxes – what was strange about this was that we hadn’t set this at all during our migration, and it seemed to be randomly applied to about 30% of the mailboxes.

You can check this setting with the following command:

Get-Mailbox -ResultSize unlimited | Where-Object {$_.RetentionHoldEnabled -eq $true} | Format-Table Name,RetentionPolicy,RetentionHoldEnabled –Auto

With this result:


Looking through the list of users, there was a mixture of E1 and E3 licenses, but no K1 licenses or shared mailboxes. This made sense, as K1s and shared mailboxes didn’t have archiving enabled.

It’s important to note that Retention Hold is not the same as Litigation Hold – Litigation Hold puts a change freeze on a mailbox so that a user can’t delete or change items in their mailbox. It generally happens behind the scenes, and most users don’t notice that their mailbox has litigation hold applied, as deleted items disappear as normal, and the deletions/changes end up in a separate folder that the user cannot see.

Retention Hold, on the other hand, prevents the Managed Folder Assistant from running on that mailbox and processing retention tags. This means that users with Retention Hold enabled will not have their emails archiving or deleting based on the policies that have been set up in their Retention Policy.

After looking around a bit, I began to notice a pattern – each of the users who had their RetentionHold set to Enabled were users that we had been importing PST files into their online archives using the Office 365 Import Service. We had already noticed a bug (and opened a ticket), because we were not able to manually delete the jobs, and they weren’t automatically being deleted after 30 days the way they’re supposed to be.

It seems like Retention Hold is being enabled when a PST import job starts, and the flag is not being cleared automatically because the jobs are not being deleted properly.

You can fix this on a single mailbox by running the following command:

Set-Mailbox -RetentionHoldEnabled $false

Alternately, if you want to run this for all affected mailboxes, here’s the command to use:

Get-Mailbox -ResultSize unlimited | Where-Object {$_.RetentionHoldEnabled -eq $true} | Set-Mailbox -RetentionHoldEnabled $false

Hopefully Microsoft will get this bug resolved soon so that we have better control over the PST Import service – in the meantime, you can use this script to get retention policies functioning properly again.

Hope this helps!

About the Author:

6 Responses to “RetentionHoldEnabled Inconsistency”

  1. Benjamin James Owens

    May 10, 2016

    Hi Jeremy,

    Thanks for this post. We noticed the same sporadic behaviour on mailbox during a migration.



    • Jeremy Dahl

      May 12, 2016

      My pleasure – glad it helped!

  2. Junior

    November 28, 2017

    Tks a lot Jeremy ! It solved my problem !

    We are at 2017 and the bug stills remain !

    • Jeremy Dahl

      November 29, 2017

      You’re most welcome, glad it helped!

  3. Craig

    April 11, 2018

    its now 2018 and the bug STILL exists. On phone with Microsoft they were adamant that it must be another admin at the company that has enabled the RetentionHoldEnabled via PowreShell!!! Makes sense that people imported this week sometimes now have RetentionHoldEnabled set to True.

    you can fix each with this:

    Get-Mailbox -Identity | Fl *retention*
    Set-Mailbox -Identity -RetentionHoldEnabled $False
    Start-ManagedFolderAssistant -Identity

    • Jeremy Dahl

      April 11, 2018

      Thanks Craig, that’s a good tip! If you don’t manually start the Managed Folder Assistant, it’ll run automatically every 7 days – that said, I always love being able to make things happen on MY time, and that’s exactly how you’d do it. 😀


Leave a Reply

Jeremy Dahl

Jeremy Dahl - Office 365 Evangelist

Proud member of the team at: