ra2 studio - Fotolia

Manage Learn to apply best practices and optimize your operations.

Migrate Office 365 tenants with a hybrid Exchange Server

Once organizations have three important factors in place, admins have the power to complete Office 365 migrations with hybrid Exchange.

When companies experience mergers or acquisitions, the buying company often looks to consolidate infrastructure....

If either company involved uses Office 365, Exchange admins will be busy making sure the consolidation process is smooth and successful.

We've talked about some of the reasons why to migrate mailboxes between Office 365 tenants and why this process isn't so simple. We've also looked at some of the prerequisites organizations have to meet before this migration can occur.

Now that we've covered these important steps, we'll get into how admins can have a successful Office 365 migration using a hybrid server.

Office 365 migrations via hybrid Exchange Server

If we have the right computing power, the right amount of available storage and full Exchange Server licensing, we can perform a migration of Office 365 tenants via our hybrid Exchange Server. This involves offboarding from one Office 365 tenant into local mailboxes before migrating the mailboxes back up to Office 365 via our normal hybrid relationship.

Our first step is to add an additional routing address to each mailbox in the source Lisa Jane Designs tenant. In our example, we've added a second address using the tenant domain lisajanedesigns.onmicrosoft.com. This will route from the on-premises organization to Office 365 before we migrate the mailbox (Figure 1).

We'll also enable the on-premises user as a Remote Mailbox using the Enable-RemoteMailbox PowerShell command. Ensure the email addresses include the Office 365 tenant email addresses, so mail routing can work after enabling the user. This includes setting the primary SMTP address to the lisajanedesigns.co.uk and the Remote Routing Address to use the tenant domain, lisajanedesigns.onmicrosoft.com. We'll also add an email address for the user within GoodmanIndustries.co.uk (Figure 2).

Mail routing to the Lisa Jane Designs user will work at this point, and users should also be able to receive mail addresses to the new Goodman Industries address. Before we move the mailbox to our existing hybrid server, we need to apply all mandatory attributes.

We particularly need to ensure the Exchange mailbox global unique identifiers (GUIDs) from Office 365 are configured on the on-premises Remote Mailbox. Open an Exchange Management Shell session and connect to Exchange Online PowerShell from the same session. Use the connection to both environments to stamp attributes from the cloud onto on-premises (Figure 3).

We can script out the process for a large batch of users. It's fairly straightforward. At this point, the user mailbox in the source Office 365 tenant is ready to move on-premises before journeying into the target Office 365 tenant.

Our next step is to configure the Office 365 source tenant so it has a Migration Endpoint on the existing hybrid Exchange Server. This configuration ensures that the Lisa Jane Designs source tenant knows the HTTPS name and credentials to log into the Goodman Industries Hybrid server and offboard a mailbox.

We'll configure this in the Office 365 tenant by navigating to Recipients and choosing Migration. In the More menu, choose Migration Endpoints and follow the wizard to add a new endpoint using details for the on-premises hybrid server (Figure 4). You'll then choose Add and select Migrate From Exchange Online (Figure 5).

The New Migration Batch wizard will launch. After choosing the new migration endpoint and after a mailbox has been suitably prepared, we'll define the Move Configuration. We'll choose the Target Delivery Domain as our target organization address that we added to the on-premises Remote Mailbox -- this is goodmanindustries.co.uk in this case. Enter the name of an on-premises Mailbox Database and follow the wizard through to completion.

Migrating from the Office 365 source tenant is similar to moving mailboxes to Office 365. The mailbox in Office 365 will convert to a mail-enabled user after the migration is complete, and the Remote Mailbox will convert to a normal on-premises Mailbox on the hybrid Exchange organization.

After moving all mailboxes from the source Office 365 tenant, we'll need to migrate them to the target Office 365 tenant. This will be done in the exact same way as we normally move mailboxes to Office 365 tenants. Before we do this, we need to first remove the source domain for the source Office 365 tenant -- in our case, lisajanedesigns.co.uk -- and register it in the target Office 365 tenant. We'll then need to run the Hybrid Configuration wizard again, this time specifying the additional hybrid domain.

We'll also have a couple of steps to perform for each mailbox. You'll remember that we've already created the user in an Active Directory organizational unit (OU) that DirSync hadn't synchronized to the target Office 365 tenant.

Before we synchronize that OU, we'll need to update a few settings on the migrated mailboxes. We need to remove any proxy addresses related to the source tenant (for example, @lisajanedesigns.onmicrosoft.com) and add the target tenant service domain (for example, @goodmanindustries.mail.onmicrosoft.com). Adding the target tenant is usually best accomplished by enabling the mailbox to use the email address policy (Figure 6).

With those changes complete, synchronize the OU containing the users via DirSync to your target Office 365 tenant. Finally, migrate mailboxes to Office 365 using a normal Migration Batch in the target tenant.

About the author:
Steve Goodman is an Exchange MVP and works as a technical architect for one of the U.K.'s leading Microsoft Gold partners. Goodman has worked extensively with Microsoft Exchange since version 5.5 and with Office 365 since its origins in Exchange Labs and [email protected]

Next Steps

This is part three in a series exploring some of the tasks Exchange admins have when mergers or acquisitions involve Office 365.

Part one covered Office 365 tenant consolidation.

Part two covered the prerequisites for a tenant-to-tenant migration and migrating with a native tool.

Stay tuned for part four, which will cover how to use a third-party tool for direct tenant-to-tenant migrations.

Dig Deeper on Office 365 and Microsoft SaaS setup and management