If you are reading this you may have seen my previous blog on fixing the Exchange Online error for not being able to send emails to a user from an external address. To link the two objects you will need to run the following commands:

This first command is to view the entire forest and then enable a remote mailbox for the user, if they already have one you can skip to the next sets.

Set-ADServerSettings -ViewEntireForest $True

Enable-RemoteMailbox -Identity firstname.lastname@domain.com

This next command you will need to run in Exchange Online PowerShell:

Get-Mailbox -Identity firstname.lastname@domain.com | FL *GUID*

Finally you will need to go back to the Exchange on-premise PowerShell and run the following:

Set-RemoteMailbox -Identity firstname.lastname@domain.com -ExchangeGuid <ExchangeGuid from Exchange Online PowerShell>

Hope this helps!

About the author