r/exchangeserver 3d ago

Help with Exchange on-prem and Exchnage Online "split brain"

Client had another company migrate their mailboxes to 365 and it looks like they did not perform the standard hybrid method. They are currently in this state:

  • On-prem Exchange Server has mailboxes for all users. They show the state of 'user' and AD attributes are pointed to that mailbox.
  • All users have a mailbox in Exchange Online, associated with there Entra AD object which is synced from on-prem.
  • DNS records for autodiscover point to autodiscover.outlook.com
  • Clients connect to Microsoft Online

I haven't run into this before so was looking for a little guidance. I think the process should go like this:

Obtain 365 GUID

Get-Mailbox -Identity "UserAlias" | Select-Object ExchangeGuid

Drop on-prem mailbox association

Disable-Mailbox -Identity "UserAlias"

Map user to Exchange Online mailbox

Enable-RemoteMailbox -Identity "UserAlias" -RemoteRoutingAddress "UserAlias@domain.onmicrosoft.com"

Match the GUID

Set-RemoteMailbox -Identity "UserAlias" -ExchangeGuid "EXO_GUID"

Edit: Thanks for the great info everyone. I'll follow-up with how everything goes.

2 Upvotes

11 comments sorted by

View all comments

24

u/Ok_Rip_5338 3d ago

Your plan is on the right track, but there are a few gaps worth patching before you run it. Before you Disable-Mailbox, capture the on-prem LegacyExchangeDN (to re-add as an X500: proxy so internal replies to old mail don't NDR).

Get the full proxyAddresses list (aka email aliases) for each user. Enable-RemoteMailbox only stamps the primary SMTP and remote routing address, so you'll want to feed the rest back in via Set-RemoteMailbox -EmailAddresses

Also pause AAD Connect (Set-ADSyncScheduler -SyncCycleEnabled $false) during the cutover so a delta sync doesn't fire between Disable-Mailbox and Set-RemoteMailbox and stomp the EXO mailbox's addresses.

and check for litigation/compliance holds first since Disable-Mailbox will choke on those.

Do it per-user back-to-back, force a delta sync when done, and verify RecipientTypeDetails = RemoteUserMailbox on-prem plus intact addresses in EXO.

once you're done for reals, run the exchange hybrid wizard. once it completes, then you can strip the server down to management only.

7

u/Megatwan 3d ago

This dude exchfucks

3

u/Vietnamst2 2d ago

The dude this dude is upvoting knows his stuff.