Skip to content

How to create Remote User Mailbox hybrid objects for mailboxes previously migrated via a staged migration

April 10, 2015

Mailboxes migrated using a staged migration remain in the on-premises Exchange Organization as User or Legacy Mailboxes. Mailboxes migrated using a hybrid migration are replaced by Remote User Mailboxes in Exchange on-premises. If you switch from a staged to a hybrid migration then it is wise to replace all on-premises staged entities with Remote User Mailboxes. This ensures consistency.

Use the following steps to replace previously migrated on-premises mailboxes with Remote User Mailbox objects:

  1. Open Exchange Management Shell (EMS)
  2. Run the following command in EMS:

    Disable-Mailbox -Identity {identity} -Confirm:$False
    Enable-RemoteMailbox -Identity {User_Name} -Alias {Alias_Name} -RemoteRoutingAddress {Alias_Name}@{Remote_Routing_Domain}
    

    For example:

    Disable-Mailbox -Identity 365test01 -Confirm:$False
    Enable-RemoteMailbox -Identity 365test01 -Alias 365test01 -RemoteRoutingAddress 365test01@exitcodezerowordpress.mail.onmicrosoft.com
    
  3. Run directory synchronization


Important notes

  • Outlook profiles may need recreating, although I’ve only tested in a mixed Exchange 2003/2010 hybrid environment where transform files had previously been used.
  • All email addresses are completely reset using the Exchange on-premises email address policy
  • X500 addresses will change so there may be issues replying to existing internal emails. The autocomplete name cache will no longer be valid, but this may not be an issue if Outlook profiles are recreated.
  • Mailboxes migrated using a staged migration remain in the on-premises Exchange Organization. Beware if you need to roll-back from Exchange Online. You must also ensure that staged clients connect directly to Exchange Online rather than Exchange on-premises as Exchange on-premises will attempt to connect users to their obsolete, migrated mailboxes.
  • I’ve not yet tested rolling back, via a hybrid remote move request, a staged user converted to a remote user mailbox.
  • After implementing a hybrid deployment into an existing staged deployment, the primary email address of all staged Exchange Online mailboxes changed from @{vanity_domain} to @{tenant_name}.onmicrosoft.com. Users retained all existing email addresses but their primary (reply) address was changed. External recipients received email sent from converted users from the senders onmicrosoft address rather than the corporate (‘vanity domain’) addresses. Email address policies wouldn’t update this. Each user’s primary email address (for Exchange 2003 mailboxes) had to be manually switched using Active Directory Users & Computers and then waiting for dirsync to update the Exchange Online mailboxes.
  • Cross-premises email routing is performed by the targetaddress attribute on the on-premises Active Directory user account. The address space for staged mailboxes is @{tenant_name}.onmicrosoft.com rather than the hybrid namesapce @{tenant_name}.mail.onmicrosoft.com, so staged mail-flow uses the default SMTP connector rather than a dedicated send connector. This means that the existing on-premises Exchange (2003) Server doesn’t require TLS and can use a smart host for outbound delivery. If you implement a hybrid deployment when on-premises and online mailboxes are currently coexisting through a staged migration, any issues with the new hybrid Exchange Server accessing EOP directly over port 25 will cause cross-premises mail-flow to break.


Scripting

You can script the conversion of mailboxes using an import script:

  1. Create an import CSV file called c:\temp\userlist.csv on the Exchange 2010 on-premises server
  2. Populate the first line with two columns:

    userprincipalname,alias
    
  3. Populate each additional line with the UPN and Exchange Alias of every staged user to be converted, one per line. For example:

    365test01@exitcodezero.wordpress.com,365test01
    365test02@exitcodezero.wordpress.com,365test02
    365test03@exitcodezero.wordpress.com,365test03
    
  4. c:\temp\userlist.csv should now look like this:

    userprincipalname,alias
    365test01@exitcodezero.wordpress.com,365test01
    365test02@exitcodezero.wordpress.com,365test02
    365test03@exitcodezero.wordpress.com,365test03
    
  5. Run the following commands in Exchange on-premises EMS, ensuring that ‘tenantname‘ in line 3 is changed accordingly:

    $UserList = Import-Csv c:\temp\userlist.csv
    $UserList | foreach {Disable-Mailbox -Identity $_.userprincipalname -Confirm:$False}
    $UserList | foreach {Enable-RemoteMailbox -Identity $_.userprincipalname -RemoteRoutingAddress ($_.alias+'@tenantname.mail.onmicrosoft.com')}
    


Also refer to this forum thread.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: