Removing and Creating New Office 365 Online Archive

June 30, 2019 Don Young

Occasionally, the need may arise to generate a new online archive mailbox for an Office 365 user.  According to Microsoft, archive mailboxes become disconnected when they are disabled.  The disconnected archive will be retained for 30 days by default and subsequently purged.

In some cases, you may not be able to wait the 30 days for the purge to happen automatically.  For cloud-only accounts, using the ‘Disable-Mailbox’ command with the ‘Archive’ and ‘IgnoreLegalHold’ switches will remove the archive mailbox in such a way that it can no longer be found.

office365-archive1

office365-archive2

office365-archive3

This is great except if you enable the online archive for the mailbox again, mysteriously the archive that moments ago could not be found, is reattached.

office365-archive4

office365-archive5

Thankfully, the ‘Set-Mailbox’ command contains a switch, ‘RemoveDisabledArchive’ that corrects the problem.

office365-archive6

office365-archive7

Note:  This article applies to Cloud-Only accounts in O365, if you are using AAD Connect with an on-premises environment, you can do the following:

  1. Run the ‘Disable-RemoteMailbox’ command from Exchange on-premises against the mailbox in question passing the ‘Archive’ switch
    1. Example: Disable-RemoteMailbox blahblah@blahblah.com -Archive
  2. Once disabled, go to on-premises Active Directory and clear the ‘DisabledArchiveGuid’ attribute
  3. Run the ‘Enable-RemoteMailbox’ command from Exchange on-premises against the mailbox in question passing the ‘Archive’ switch
    1. Example: Enable-RemoteMailbox blahblah@blahblah.com -Archive
  4. When the object syncs, the attribute will clear out on the O365 object thus creating a brand-new online archive mailbox in Exchange online

These steps should help in situations where a new online archive mailbox is needed in a timely manner and waiting 30 days for the automatic purge is not an option.

Previous Article
Office Explorers Episode 008: Azure with Evan Riser
Office Explorers Episode 008: Azure with Evan Riser

In the latest Office Explorers podcast, Kat Memeza and Rob Murray dive into the world of Azure with New Sig...

Next Article
What’s New in Azure – June 2019
What’s New in Azure – June 2019

On the back of Microsoft Build 2019, there have been a whole host of updates to Azure and the multitude of ...