How to Use PowerShell to Perform a Cutover Migration to Office 365

Office 365 being a renowned software and services subscription is deployed in a large number of organizations. It automatically detects the running server, i.e. Exchange 2013, 2010, 2007 on-premises. It uses a process known as cutover migration or cut over email migration, in which user can use the Office 365 setup wizard to copy the data if there are less than 151 mailboxes. After copying the data, they can add all the users at the same time. In the following session, we will discuss a way to use PowerShell to perform a cutover migration to Office 365.

Things to Know

Users need to log in and import cmdlets on local Windows PowerShell session to access cmdlets of Exchange Online PowerShell. Discover what you need to know about a cutover email migration to Office 365.
Before performing this process, users require various permission.

Use PowerShell to Perform a Cutover Email Migration to Office 365

There are few steps involved, which helps users to perform a cutover migration of email to Office 365 by utilizing PowerShell as mentioned below:

Step 1: Prepare for Migration

Before Wizard can copy the email data and add users, complete few changes on-premises Exchange Server environment.

  • Add on-premises as accepted domain: The migration service utilizes SMTP address of user’s on-premises mailbox that creates user ID for MS Online services and email address for mailboxes of new Office 365. If Exchange domain is not accepted then, migration will fail or primary domain of Office 365 organization.
  • Configure Outlook Anywhere: Some services are used by email migration, i.e. RPC over HTTP, Outlook Anywhere to connect on-premises Exchange server. There are different ways to enable Outlook Anywhere on Exchange server 2010, 2007, 2003.

Note: Outlook Anywhere configuration should be configured with certificate that is issued via CA (certification authority).

  • Verification: User can try any of the mentioned method to examine the connection settings. As mentioned.
    1. Utilize MS Outlook from outside the organization for the connection of on-premises Exchange mailbox.
    2. To test the connection settings, use MS Exchange remote connectivity analyzer.
    3. Run the mentioned command on PowerShell of Exchange online.

    1a

  • Assign Required Permissions: User account of on-premises, which is used to utilized to user’s on-premises Exchange organization. They must have permissions to utilize on-premises mailboxes, which is required for the migration to Office 365. This account is accessed in creating endpoint of migration for on-premises organization. There are some administrative privileges, which are required for migration by utilizing cutover migration. There are some mentioned options:
  • 1. In active directory in the on-premises organization, administrator should be a member of group of Domain Admins.
    2. Full Access permission should be assigned to the administrators for every on-premises mailbox.
    3. Receive As permission must be allotted to administrator for storage of user mailbox.

  • Disable Combined Messaging
    If the mailboxes of on-premises are enabled for UM (Unified Messaging) then, users have to disable it on mailboxes before starting migration. It can be enabled again only after the completion of migration.
  • Security Delegates and Groups
    The email migration services cannot be detected whether groups of Active Directory groups are secured or not. If users require the security groups in Office 365 then, user must provision empty mail and enable the security group before performing a cutover Exchange migration to Office 365. Moreover, this method of migration only allows moving of mailboxes, contacts, mail users, and mail-enabled groups. If other Active Directory object like a user is not migrated to Office 365 and is allotted as delegate or manager to an object that is migrated. It should be removed from the object before you use PowerShell to perform a cutover migration to Office 365.

Step 2: Create Endpoint

For the successful migration, Office 365 should be connected with email system of source. To perform this, Office 365 utilizes endpoint of migration. Firstly, user needs to connect to Exchange Online for the creation of endpoint of Outlook Anywhere migration. Now run the following command on PowerShell in Exchange online:
1b

User can utilize Test –MigrationServerAvailbility cmdlet to obtain and test the settings of connection to on-premises Exchange server, and then utilize those settings of connections for the creation of migration endpoints known as CutoverEndpoint.

1c

Note: The cmdlet New-MigrationEndpoint can be utilized for specifying database service by using targetDatabase randomly allocated from services of Active Directory Federation, where mailbox is located.
For the Verification run the mentioned command on PowerShell to displayinformation about CutoverEndpoint migration.

1d

Step 3: Create Cutover Batch Migration

User can create cmdlet New-Migration Batch in Exchange OnlinePowerShell for the creation of batch migration. They can create batch migration and begin it automatically by including AutoStart parameter. Even, the user can create it and then manually start it after utilizing cmdlet Start-MigrationBatch.

Step 4: Begin Batch Cutover

User can run the mentioned command to begin the batch migration in Exchange online. It creates migration batch known as “CutoverBatch.”

 

1f

Step 5: Route All Emails

Mail systems utilize DNS record known as MX record that helps to figure out where the mail has to deliver. At the time of email migration procedure, MX record was pointing towards source mail system. Now, that mail migration is completed to Office 365, its time to point MX record at Office 365. It helps to make sure that the mails are delivered to mailboxes of Office 365. With MX record, user can also off the old mail system after completion of migration.

Step 6: Deletion of Cutover Migration

After changing the MX record, verify all the emails are routed to mailboxes of Office 365 properly or not. After this, user can delete the cutover migration batch. Before deletion, verify the following:

1. All users are utilizing Office 365 mailboxes. After the deletion of batch, mail is sent to mailboxes and on-premises server is not copied to resultant mailboxes of Office 365.

2. Mailboxes of office 365 were synchronized at least once after beginning the sending of mail directly. For this, make sure that value in last synced time box for batch migration is more recent than the started mail.

Step 7: Allot Licenses

Assign licenses to users to activate Office 365 user accounts for the migrated accounts. If the license is not assigned then, mailbox is disabled when the grace period ends.

Step 8: Complete Task of Post-Migration

  • Create Autodiscover record of DNS
    After on-premises mailbox are migrated to Office 365, user can configure autodiscover DNS record for the Office 365 organization to enable users to connect with their new Office 365 mailboxes via mobile and Outlook clients. It uses the same namespace that is utilized for Office 365 organization. It utilizes CNAME record for implementation of service of Autodiscover for mobile and Outlook. It should contain following information:

    1. Alias

    2. Target

  • Decommission on-premises Servers
    User can uninstall all exchange from servers and remove on-premises Exchange organization if it is verified that all the emails are routed directly to mailboxes of Office 365. Then, there is no need to maintain the on-premises mail organization.

Use PowerShell to Perform a Cutover Email Migration to Office 365

In the above discussion, complete process is discussed to use PowerShell to perform a cutover migration to Office 365. If the steps are followed in a correct manner then user can perform a Cutover email Migration to Office 365. However, if any issue is faced while performing the process of migration, drop a comment below, and the problem will be seen by experts.