During a recent move from on-premise Exchange 2010 to Office 365 Hybrid, I wanted to create a new user in the AD and then enable a mailbox for it afterwards, this gave this error in Exchange 2010 Powershell:
Enable-RemoteMailbox email@example.com -RemoteRoutingAddress firstname.lastname@example.org
ExchangeGuid is mandatory on UserMailbox.
Database is mandatory on UserMailbox.
After troubleshooting the issue, there where entries in the msEX… attributes of the user, that pointed to an old Exchange server.
Open the users object i ADUC Advanced mode, and look in Attribute Editor:
Find any entry beginning with msExh, and remove everything, so all msEx attributes are “”
Wait a little for AAD Connect to sync it’s stuff, or do a manual synchronization.