0 XP

Recovering and restoring inactive mailboxes

Find it

Recovering and restoring an inactive mailbox are PowerShell-only. The EAC and the Purview portal can't do either.

Start by listing the inactive mailboxes:

  • Get-Mailbox -InactiveMailboxOnly | FL Name,DistinguishedName,ExchangeGuid,PrimarySmtpAddress.

Identify the mailbox by its ExchangeGuid.

Check the 30-day window first. If the mailbox was soft-deleted less than 30 days ago, New-Mailbox -InactiveMailbox won't work, so restore the user account instead.

Get-Mailbox -InactiveMailboxOnly with FL ExternalDirectoryObjectId tells you which case you're in. An empty value means the window has expired and recovery is possible.

Recover versus restore

  • Recover turns the inactive mailbox into a new active mailbox. Afterwards the inactive mailbox no longer exists.
  • Restore copies, or merges, its contents into an existing mailbox. The inactive mailbox stays inactive. The archive can be restored too.

The command for recovery is New-Mailbox -InactiveMailbox, followed by the ExchangeGuid, -Name, -FirstName, -LastName, -DisplayName, -MicrosoftOnlineServicesID, -Password and -ResetPasswordOnNextLogon.

  • A new user account is created, and it must be licensed.
  • The new mailbox's primary SMTP address is the MicrosoftOnlineServicesID you gave.

What recovery does to holds

  • A retention policy with Preservation Lock stays assigned.
  • A retention policy without Preservation Lock is removed, and Litigation Hold is turned on in its place.
  • An existing Litigation Hold is removed.
  • Any In-Place Holds are removed.
  • RetainDeletedItemsFor is set to 30 days. The normal default is 14.
  • A retention hold is turned on for 30 days. You can change its end date with Set-Mailbox -EndDateForRetentionHold.

Once the archive is enabled, the default MRM policy moves items older than two years into it.

The auto-expanding exception

An inactive mailbox with an auto-expanding archive can't be recovered or restored. Its data can only be exported through a content search, for eDiscovery.

Auto-expanding archiving can't be turned off, so there is no way around this. Before you turn auto-expanding on for leavers who will be held, check that a content search export is enough for them.

Knowledge check

7 questions on what you just read. Each answer shows the full explanation and its source.

Loading…