Home » Migration » Master Office 365 Staged Migration: A Comprehensive PowerShell Tutorial!
Migration, Office 365 ~ 8 Minutes Reading

Master Office 365 Staged Migration: A Comprehensive PowerShell Tutorial!

author
Published By Siddharth Sharma
Anuraag Singh
Approved By Anuraag Singh
Calendar
Published On September 2nd, 2024

Summary:- In today’s rapidly evolving digital landscape, organizations increasingly adopt Office 365 for its collaborative & productivity benefits. An Office 365 staged migration can offer a smoother transition, especially for those with extensive data & complex systems. This phased approach minimizes disruptions and ensures a flawless shift to the cloud. In this write-up, we'll outline the key strategies and best practices for a successful migration!

Moving mailboxes from an on-premises Exchange server to Exchange Online is a staged Exchange migration. It will only work with older Exchange environments (like 2003 or 2007) & organizations with a large number of mailboxes. Following are the steps to initiate the task with this:  

  1. Set up a hybrid configuration
  2. Prepare your on-premises mailboxes
  3. Migrate them in batches
  4. Decommission on-premises server

Following this step-by-step approach, you can smoothly transition your organization to a new platform. But, the question is tackled to every user’s mind, how can we perform this? Keep calm! In the below sections, we will explore the detailed guidelines of the same which are quite simple to understand & implement. 

Key Considerations Before Beginning Office 365 Staged Migration!

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. 

Below-mentioned points are some of the transition requirements:

  • With Azure Active Directory sync, accounts should be properly synchronized between the domain of on-premises Active Directory & Office 365 for working with staged migration.
  • No other recipient types like distributed groups, contacts, and mail-enabled users cannot be migrated with this 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 to Email: Users will get access to the mailboxes of the source email system to perform the migration.
  • Creation of New Microsoft Outlook Profile: After this 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 to connect Outlook & Office 365 accounts.

Now, Look at the Procedure for the Transition Via PowerShell

Some steps involved help users perform staged migration by using Powershell as mentioned. Remember throughout the task, you can face some Office 365 migration challenges, so follow the instructions carefully & implement them wisely.

Step 1. Prepare for Office 365 Staged Migration

Before starting the migration of mailboxes, users first need to make 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 to check 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.

Office 365 Staged Migration

  • Set Permissions – Office 365 Staged Migration:
    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 to create a migration endpoint. To export emails from Exchange Server, the admin must have any of the mentioned permission sets. 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 to modify 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) for Office 365 Staged Migration:
    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 for the add 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 Office 365 Staged 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 and firstly; a Connection with Exchange Online is required. User can run the mentioned command for the creation of an endpoint known as StageEndpoint:

Generate the Endpoint

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:

For Verification run this

Step 4. Produce and Begin Batch Office 365 Staged 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 including the AutoStart parameter. Otherwise, it can be created and started manually after utilizing the cmdlet Start-MigrationBatch.

Batch Office 365 Staged Migration

For Verification run the following command:

For Verification run this

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

verify if the batch has started

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 on-premises due to reasons, as they are not done with the staged 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.

Deletion of Office 365 Staged Migration

It can be verified by running the following command about IMAPBatch1

command about IMAPBatch1

The cmdlet will either return the status of removing batch migration or 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.

Post Office 365 Staged Migration Setup Tasks

  • 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 this task, 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

Observational Verdict!

Using PowerShell to perform Office 365 staged migration can be tough if you do not have significant knowledge or are not familiar with technical know-how. Plus, following the wrong way can vanish everything. That’s why we are here to provide you the precise knowledge & stepwise instructions of the same to ensure minimal disruption and avoid the risk of data loss. So, don’t waste time, go through the mentioned guide, and initiate the task hassle-free.