Enable Mailbox Archive in Exchange Hybrid via PowerShell

To enable In-Place Archive for mailboxes migrated to Office 365 while Exchange Hybrid is implemented we must be aware that there is only one way to enable archiving … through the on premise Exchange environment.

It’s a bit frustrating when we attempt to enable archiving for a mailbox in O365 to get this message…

Archiving Error 1

Also, if we use the Azure AD PowerShell Module from on premise, while connected to the O365 tenant, we will see this error message…

Archiving Error 2

Both error messages are the same.

In this scenario, we have an Exchange 2010 server configured as the hybrid server; however, the tasks and commands used with Exchange 2013 are the same.

Therefore, as the error directs us, we need to use the Exchange Management Shell (EMS) from our on premise Exchange Hybrid server to enable O365 mailboxes for archiving.

This command will enable archiving for a single O365 mailbox…

Enable-RemoteMailbox -Identity "USER_ALIAS" -Archive

 

To enable all O365 mailboxes for archiving at once, this is the command we used…

Get-RemoteMailbox -ResultSize Unlimited -Filter {(RecipientTypeDetails -eq 'RemoteUserMailbox')} | Enable-RemoteMailbox -Archive

 

If we plan properly, and we know we will be utilizing the archive features in O365, before migrating any mailboxes (while still in Exchange) we may decide to enable archiving (on premise) and then move the mailboxes with the archive (although it may be empty) during the migration processes to O365.

!!! Lastly, don’t forget to wait for or force a directory synchronization with Office 365 via AADConnect (or DirSync or AADSync) so the mailbox in O365 shows it is enabled for archiving.

Good luck and have fun!

 

Related Articles in this Blog:

 

Reference(s):

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s