Enabling an Office 365 Archive Mailbox with PowerShell (Exchange Online)

In the post below, I will cover two methods on how to enable an Archive Mailbox in Office 365 (Exchange Online) using PowerShell. The first method will be a straight forward non-hybrid deployment where the archive is enabled in Exchange Online and the second method will be a hybrid deployment of Exchange with Exchange Online, where the archive mailbox value must be set on premise and synchronized to Exchange Online, where the archive mailbox is enabled. The first thing to do is to make sure that the Office 365 license assigned to the user has the Archive option included.

Non-Hybrid Deployment

Use this Microsoft KB article for more detailed scenarios.

https://technet.microsoft.com/en-us/library/jj984357(v=exchg.150).aspx

Connect to Exchange Online with PowerShell

Use the Enable-Mailbox command to activate the archive

  1. Enable-Mailbox <User Name or Email Address> -Archive

Verify the archive is enabled

  1. Get-Mailbox <User Name or Email Address> | Format-List Name,*Archive*

Hybrid Deployment of Exchange On-Premise and Exchange Online (Office 365)

Because of the hybrid setup of Exchange and the fact that local AD is being synchronized to Azure AD, we need to set the archive value in on-premise AD and let DirSync or AD Connect synchronize the value to Azure AD to enable the archive mailbox in Exchange Online.

Use these Microsoft KB articles for more details.

https://technet.microsoft.com/en-us/library/jj614563.aspx

https://blogs.technet.microsoft.com/rmilne/2015/04/30/enable-remote-archive-with-exchange-hybrid/

Open the local version of Exchange Management Shell

Use the Enable-RemoteMailbox command with the -Archive switch to activate the Archive mailbox in Exchange Online

  1. Enable-RemoteMailbox <User Name or Email Address> –Archive

Synchronize local AD with Azure AD (scheduled or manual) (DirSync or AD Connect)

Verify the archive is enabled

  1. Connect to Exchange Online with PowerShell
  2. Get-Mailbox <User Name or Email Address> | Format-List Name,*Archive*

Leave a Reply