How to Use PowerShell to Perform Office 365 Staged Migration – Complete Guide

Staged Exchange Migration to Office 365

author
Published By Siddharth Sharma
Anuraag Singh
Approved By Anuraag Singh
Published On November 7th, 2023
Reading Time 10 Minutes Reading
Category Migration, Office 365

Office 365 Staged Exchange Migration is a process for moving mailboxes from an on-premises Exchange server to Office 365. It involves setting up Exchange Online in a hybrid configuration, migrating batches of mailboxes from the on-premises server to Exchange Online, and then decommissioning the on-premises server. The Office 365 Staged migration process is a reliable and secure way of moving data from one environment to another.

It is mainly used when the source mail system is Exchange Server 2003 or 2007. It is even used when the user is having more than 2,000 mailboxes to migrate. In the following section, we will discuss the method to use PowerShell to perform an Office 365 staged Exchange migration.

Pre-Requisites of Office 365 Staged Migration That You Should Know

In order to use Exchange Online Powershell cmdlets, there is a need to sign in and import cmdlets on the PowerShell session of Windows. Users need to fulfill certain prerequisites before starting this migration. Know what you need to know about an Office 365 Staged migration.

Below-mentioned points are some of the Office 365 Staged migration requirements:

  • With Azure Active Directory sync, accounts should be properly synchronized between the domain of on-premises Active Directory and Office 365 for working with staged migration.
  • No other recipient types like distributed groups, contacts and mail-enabled users cannot be migrated with an Office 365 Staged migration procedure. Therefore, only the user’s mailboxes and resource mailboxes can be migrated.
  • The primary domain name should be verified by your Office 365 organization.
  • Office messages are not moved with user mailboxes. If a user enables this feature before the migration procedure, then the feature will be enabled in the resultant mailbox, but the Out of Office message folder will be blank.
  • To upgrade the performance of migration, connections should be limited to your email system. This limitation involves the client/server total connections, per-user connections, and IP address connection either on the firewall or the server. If you don’t want to limit the connections, then skip this procedure.

How Does Office 365 Staged Migration Affect Users?

  • Administrators Can Gain Access On Email: Users will get access to the mailboxes of the source email system in order to perform the migration.
  • Creation of New Microsoft Outlook Profile: After Office 365 staged migration, all the mailboxes are moved and on-premises accounts are then converted to mail-enabled accounts. In MS Outlook, users should create a new Office 365 profile in order to connect Outlook & Office 365 accounts.

Complete the Procedure to Perform Office 365 Staged Migration Using PowerShell

There are some steps involved that help users to perform staged migration by using Powershell as mentioned.

Step 1. Prepare for Migration

Before starting the migration of mailboxes, users first need to have a few changes to the Exchange environment.

    • Configure Outlook on-premises Server:
      The migration service utilizes Outlook anywhere for connection with on-premises Exchange Server, which is also known as RPC over HTTP.
      Note: The user can utilize a certificate issued by a trusted CA (certification authority) with the configuration of anywhere Outlook. It cannot be configured with a certificate of self-signed.
    • Verification:
      Users can try any of the mentioned ways for checking the configuration settings by using Outlook anywhere.
      1. Utilize Outlook from outside the cooperate network for connection with the on-premises mailbox of Exchange.
      2. MS Exchange Remote Connectivity Analyzer can be used for verifying the proper settings of connections.
      3. Run the mentioned command on Exchange Online Powershell.
      1
    • Set Permissions:
      The on-premises account that is used for the connection with the on-premises Exchange organization must have the essential permissions for utilization of on-premises mailboxes for migration to Office 365. This account is utilized when the user needs to connect to the email system for creating a migration endpoint. For the migration of mailboxes, the admin must have any of the mentioned permission sets:1. In an on-premises organization, in the Active Directory be a member of the Domain Admins group.
      2. Assign full permission to access each on-premises mailbox and permission of WriteProperty for modifying the property of TargetAddress on the user account.
      3. Allot permission of Receive As on the mailbox database, which saves the user’s mailbox and permission to WriteProperty for modification of the property of TargetAddress on user accounts.
    • Disable UM (Unified Messaging):
      If Unified Messaging is enabled for migrating mailboxes then, before starting the process of migration turn off UM. Once the migration is completed then, turn on the Unified Messaging.
    • Make New Users by using Directory Synchronization:
      Directory synchronization is used for creating the whole users of on-premises in the organization of Office 365. After creating, users need to license; they have thirty days the addition of license after creating. They can even use MS Azure Active Directory Synchronization Tool or service for the creation and synchronization of on-premises users in Office 365. After mailbox migration, the user can manage it on-premises organization and synchronize it on the organization of Office 365.

Step 2. Create a CSV File
After identifying users for On-Premise Exchange to Exchange Online Migration, they can use CSV files for the creation of batch migration. Each row of CSV file is used to run migration by Office 365 that contains the info related to the on-premises mailbox. For the staged migration of CSV file, three attributes are supported, i.e. EmailAddress, Password, and ForceChangePassword.

Note:
1. Unlimited mailboxes can be migrated to Office 365.
2. CSV file contains 2,000 rows, for the migration of more than 2,000 mailboxes additional CSV file creation is required and utilizes new batch migration for utilization of each file.

Step 3. Generate the Endpoint of the Migration

For successful migration to Office 365, proper communication, as well as connection, is required with an email system. To perform this, Office 365 utilizes a migration endpoint. It can be created by using Powershell for that firstly; a Connection with Exchange Online is required. User can run the mentioned command for the creation of an endpoint known as StageEndpoint:

2

Note: New-MigrationEndpoint cmdlet is utilized for specification of database service for utilization by using an option of TargetDatabase. Otherwise, it will be directed from the services of the Active Directory Federation, where it is located.

For Verification run the following command:
3

Step 4. Produce and Begin Batch Stage Migration

Users can utilize cmdlet New-MigrationBatch in Exchange Powershell for the creation of batch migration for cutover migration. They can make a migration batch and begin it automatically that includes AutoStart parameter. Otherwise, it can be created and started manually after utilizing the cmdlet Start-MigrationBatch.
4

For Verification run the following command:
5

To verify if the batch has started, you can use the following command:
6

Step 5. Convert to Mail-Enabled Users

Once there is, a successful batch migration of mailboxes now, users must require some way that helps them in getting their mail. They have their mailbox on both on-premises and Office 365. Users who have a mailbox in Office 365 will not receive a new email in their mailbox of on-premises due to reasons, as they are not done with the migration. When they change from a mailbox to a mail-enabled, they can direct to Office 365 for their email instead of going to their on-premises mailbox.

Another reason for the conversion of mailboxes on-premises to mail-enabled users is to preserve the proxy addresses from Office 365 mailboxes by creating the replica proxy of addresses for mail-enabled users. It helps in the management of users of cloud–based by using Active Directory.

Step 6. Deletion of Office 365 Staged Migration

After converting mailboxes of on-premises in batch to mail-enables users, they can delete batch-staged migration. Before that make a confirmation that the mail is being forwarded to Office 365 mailboxes in batch migration. When they delete staged migration in batch, the service clears all the records related to batch migration. They can use the mentioned command on Powershell to perform the deletion.

7

It can be verified by running the following command about IMAPBatch1

8

The cmdlet either will return the status of removing batch migration or will give an error.

Step 7. Allot License

Assign the licenses to activate user accounts of Office 365 for the migrated accounts. If the license is not permitted then, the mailbox is disabled after the thirty days of the grace period.

Alternative Solution of Office 365 Staged Migration (Recommended by Tech Experts)

It is pretty clear from the above method that the manual process is so lengthy and time-consuming. It can also result in some annoying issues which can increase complexities during the process. Thus, many tech experts suggest that users/organizations use a reliable yet modern application such as this Exchange to Office 365 Migration Tool by SysTools.

Download Now Purchase Now

This application has made SysTools a migration leader which makes the entire migration task simple and efficient and eliminates the complexities of the manual method. The simple-to-use graphical interface helps users to carry out the task in an effortless way. Additionally, the trial version is free to use which means you can try all the features of the tool before purchasing the licensed version of the software.

Prominent Features of the Tool:

  • Migrate (Emails, Calendars, Contacts) to Cloud
  • Support Migration of 2010, 2013, 2016 to Office 365
  • Allows Migrate Exchange 2019 to Office 365
  • No Constraints on Number and Size of Exchange On-Premise Mailboxes
  • Feature to Use Filters (Date-Range and Category-Based)
  • Concurrent Migration to Export up to 200 Mailboxes from Exchange Simultaneously
  • Live Process Monitoring and Prioritize Mailboxes for Migration
  • Runs Smoothly on Windows 10, Windows Server 2012, 2016

Software Working Steps

Step 1. Download and Install Tool: First, download and install the software on your local system. 

Step 2. Select Source and Destination: After that, select the source and destination migration platform as Exchange and Office 365.

Step 3. Configure Required Workload:  Enable the required workload from the given menu such as email, contact, and calendar. Apply date filter if required.

Step 4. Configure Source and Destination: Now, to configure your Exchange environment in this tool, provide all the details and then validate permissions. Likewise, log in with the destination Office 365 admin account and validate permissions.  

Step 5. Create User Mapping: Now, create a mapping for the source and destination users to migrate. Use any of three options such as fetch users, import users, and download template option. This will help you in bulk user migration.

Step 6. Apply Settings and Start Migration: Validate the required permissions and set the user-level priority and then click on the start migration button. 

Step 7. Migration Report: Finally, when the migration process is completed, you will get a detailed report of the migration process. This report will include the total number of items, the size of the items, and other details.

Post Office 365 Staged Migration Setup Tasks

Step 8. Complete the task of Post-Migration

  • Create DNS Autodiscover Record:
    After on-premises mailboxes are migrated to Office 365, the user can configure auto-discover records of DNS. It permits them to have a connection easily to their new account via Outlook or mobile clients. It uses the same namespace, which is used for the organization of Office 365. It uses a CNAME record for the implementation of the service Autodiscover for Outlook and mobile. It must contain the following information:
    1. Alias
    2. Target
  • Decommission on-premises Servers:
    After the verification of routed emails to Office 365 mailboxes then, users can uninstall Exchange from servers and remove on-premises of Exchange organization.

To end up with an Office 365 staged migration, you can use the following tricks:

  • Configure or verify whether your directory synchronization is active or not
  • Examine whether your Outlook Anywhere is working or not
  • Creation of one or more lists of mailboxes for migrating to Excel
  • Systematically configure and start up the migration process
Conclusion

Using PowerShell to perform a staged Office 365 migration can be really tough if you do not have significant knowledge or if you are not technically sound. 

However, using the above-mentioned tool can be a more efficient way of migrating a large amount of data to the cloud. It provides considerable control and allows for the data to be moved in batches, reducing the risk of disruption or data loss. It also allows for a smoother transition as it can be used to test and validate the data before the full migration is completed.