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.

1 Comment

  1. pm Reply

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

Leave a Reply

Your email address will not be published. Required fields are marked *

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