Migration of users from Online Exchange to Local Exchange (Hybrid Model)

Copper Contributor

Hello There,

I would like to know if there is a way to mass-migrate Online Exchange users to our local exchange (hybrid) while keeping the same GUID and bypassing users that already exist on the on-prem.

So far we have been creating users in Active Directory directly which means that no mailbox is created.
We do have a hybrid model and by adding a microsoft license to the user (in our case all users get the E3 one) a mailbox for the user is created on the Online Exchange.
There are around 500 users on the online exchange and 100+ on the local exchange (hybrid, exist on both).

The plan was to decomission the local exchange and thus the users were created directly on the online exchange, but as you are all aware plans change.

The powershell cmdlets that we use to migrate users individually are the following:

1) 365 - Powershell cmdlet
Connect-ExchangeOnline -UserPrincipalName email address removed for privacy reasons          #{Connects to EXO}

Get-Mailbox email address removed for privacy reasons | fl ExchangeGuid ----                            #{Get Online GUID for Johny}

2) On-Prem Local exchange - Powershell cmdlet
Enable-RemoteMailbox t.johny -RemoteRoutingAddress email address removed for privacy reasons

#{Creates a remote mailbox on the on-prem exchange}

Set-RemoteMailbox t.johny -ExchangeGuid c3a72578-9de8-498f-b347g-d154746924547

#{Sets the same GUID as in online Exchange}

Any idea how we can replicate this for all users bypassing the ones that already exist?

2 Replies



You can use the remote move migration wizard in the EAC in Exchange Online to move existing cloud mailboxes to the on-premises Exchange organization:


  1. In the EAC, go to Office 365 > Recipients > Migration.
  2. Click Add Add Icon., and then select Migrate from Exchange Online.
  3. On the Select the users page, select Select the users that you want to move and then click Next.
  4. On the Select the users page, click Add Add Icon. and then select the Exchange Online users to move to the on-premises organization, click Add and then click OK. Click Next.
  5. On the Confirm the migration endpoint page, verify that the FQDN of your on-premises Exchange server is listed when the wizard confirms the migration endpoint. For example, "mail.contoso.com". Click Next.
  6. On the Move configuration page, enter a name for the migration batch in the New migration batch name text field. Then enter the target delivery domain in the Target delivery domain for the mailboxes that are migrating to Office 365 field. In most hybrid deployments, this is the primary SMTP domain used for both on-premises and Exchange Online organization mailboxes. For example, contoso.com.
  7. Choose whether to also move the archive mailbox for the selected user and enter the database name you'd like to move this mailbox to in the Target database text field. For example, Mailbox Database 123456789. Click Next.
  8. On the Start the batch page, select at least one recipient to receive the batch complete report. Verify that Automatically start the batch is selected, and then select the Automatically complete the migration batch check box. Click New.

Reference the article : Move mailboxes between on-premises and Exchange Online organizations in hybrid deployments | Microso...

If I have answered your question, please mark your post as Solved

If you like my response, please give it a Like :smile:

Appreciate your Kudos! Proud to contribute! :)


Hello there and thanks for replying.

I think I phrased it wrong.
We want to have both online and on premise user mailboxes but right now most users exist on the online exchange.

Will your solution migrate the users locally and then "delete" them from the online exchange?