Enable-RemoteMailbox –ExchangeGuid is mandatory on UserMailbox

During a recent move from on-premise Exchange to Office 365, I ran into an issue with enabling an Exchange online mailbox via Powershell for a user that already existed within on premise AD.

Enable-RemoteMailbox username@abcompany.onmicrosoft.com
-RemoteRoutingAddress username@abcompany.onmicrosoft.com
ExchangeGuid is mandatory on UserMailbox.
Database is mandatory on UserMailbox.

After troubleshooting the issue, I found that the users existing on premise attributes relating to on old/existing mailbox settings was causing a conflict.

To remove the conflicting attributes, I opened up ADSI edit (Warning: Be careful with ADSI edit!), expanded Default Naming Content > DC=ABCCOMPANY,DC=COM,DC=AU, then located the user account in question – username@abccompany.com.au, right-clicked the user and chose Properties.

Then, from within the properties dialog box, find any entry beginning with msExh, and clear the currently entered value by clicking the Clear button.

You’ll need to perform a DIRSYNC up to Office 365 to sync up the changes. Once done, re-run Enable-RemoteMailbox.

4 2 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newest Most Voted
Inline Feedbacks
View all comments
6 years ago

Thanks Craig! Been fighting with this for a couple of days. Your article steered me in the right direction. Awesome work.

Steven Drzaszcz
3 years ago

Right on the money. Cleared all existing msExch attributes on the on-prem user; Did an AAD Connect Delta Sync cycle; was able to then issue the Enable-RemoteMailbox w/o issue.

3 years ago

THANK YOU SO MUCH!!!!!!!!!!!!!!!!!!!!!