How to Get Mailbox Migration Status with PowerShell?

While migrating the mailboxes from an on-premises Microsoft Exchange Server to an Microsoft 365 tenant, you need to monitor the synchronization and migration progress. This is important to ensure that all mailboxes are migrated to Microsoft 365 (Exchange Online) successfully. If a mailbox fails due to any issues, you can fix them to complete the migration process.

Below you will learn the stepwise process to connect with the Exchange Online PowerShell and use various PowerShell cmdlets to monitor the mailbox migration batches. You can monitor the migration status of a single user or all users based on your requirements. You can also export the progress report to CSV or XML format with percentages for analysis and reporting.

Steps to Get and Monitor Mailbox Migration Status with PowerShell Cmdlets

To get the mailbox migration status and progress, you can use the following PowerShell commands:

  • Get-MigrationUser
  • Get-MigrationBatch
  • Get-MoveRequest
  • Get-MoveRequestStatistics

Below are the stepwise instructions to track the migration progress and current status while moving mailboxes from on-premises Microsoft Exchange Server to Exchange Online (Office 365/Microsoft 365).

Connect to Exchange Online

Open the Exchange Management Shell and run the following command.

 Set-ExecutionPolicy RemoteSigned
Press Y and hit Enter to confirm. This will change the execution policy and allow you to run subsequent commands to get mailbox migration status.

Run the following command to install the Exchange Online Management module. If it’s already installed, skip this command.

 Install-Module -Name ExchangeOnlineManagement

Press Y and then press the Enter key to proceed, when prompted.

Now, run the following command to connect to the Exchange Online or Office 365 tenant where you are migrating the users and their mailboxes.

 Connect-ExchangeOnline

connect to exchange online

In the Sign in to your account pop-up, enter the Exchange Online global administrator email and click Next. Then enter the password to sign in.

sign in to exchange online microsoft 365

Get the Migration Status of Users using Get-MigrationUser Cmdlet

To get and track the migration status of single or multiple users, you can use the Get-MigrationUser cmdlet.

To track the mailbox migration status of a single user in Exchange Online, run the following command.

Get-MigrationUser "UserName@DomainName.com" | ft Identity, BatchId, Status, *ItemCount, DataConsistencyScore

The output will display the mailbox identity, migration BatchID, Status, SkippedItemCount, SyncedItemCount, TransferredItemCount, and DataConsistencyScore (DCS).

If you see items in the SkippedItemCount, it indicates these items are not migrated to Exchange Online mailbox. Similarly, a low DataConsistencyScore indicates that there are bad or large items.

In such cases, you can use an EDB to PST converter software, such as Stellar Converter for EDB, to overcome the issues and migrate the mailboxes from your on-premises Exchange to Office 365 tenant directly with complete integrity. It can move all the mail items, including large mail items and mailboxes, with their original folder structure. 

To view the status of mailbox migration from on-premises to Exchange Online for multiple or all users, you can use the -BatchID or -ResultSize parameter with the Get-MigrationUser cmdlet.

Get-MigrationUser -ResultSize Unlimited -BatchId "MigrationBatch001" | ft –AutoSize

The command will display all the mailboxes in the migration batch with their current status. If you want to track all users’ migration status or migration batches, you can run the following command.

Get-MigrationUser -ResultSize Unlimited -BatchId "MigrationBatch001" | Get-MoveRequestStatistics | ft -AutoSize

Use Get-MigrationBatch Cmdlet to Get Mailbox Migration Status

To track the mailbox migration status of a specific batch, you can also use the Get-MigrationBatch cmdlet.

Get-MigrationBatch -Identity “MigrationBatch001” | fl

Use Get-MoveRequestStatistics Cmdlet to Get Mailbox Migration Status

Using the Get-MoveRequestStatistics cmdlet, you can check if the mailbox migration requests were successful and if the mailbox is successfully migrated to the desired Exchange Online tenant.

For a single user, run the below command:

Get-MoveRequestStatistics –Identity ravi

check if migration requests are successful

The output displays the StatusDetail and PercentComplete.

You may also use the Get-MoveRequest cmdlet to get the mailbox migration status for all users.
Get-MoveRequest

To check the multiple mailboxes migration status, use this command:

Get-MoveRequest –BatchName “MBXDB01toMBXDB03”

 

check multiple migration requests status

If the output displays completed, the mailbox or mailboxes have been successfully moved to the Exchange Online.

Export the Mailbox Migration Status to CSV using PowerShell

You can export the migration status of single, multiple, or all users to a Comma Separated Value (CSV) file. After running any of the above cmdlets, you can use the following command to save the mailbox migration status to a CSV file.

To export the mailbox migration status of a single user, use the below command:

Get-MigrationUser "UserName@DomainName.com" | ft Identity, BatchId, Status, *ItemCount, DataConsistencyScore | Export-Csv C:\MigrationStatus\UserName.csv -Encoding UTF8 –NTI

To export mailbox migration status of multiple users in a batch, run this command:

Get-MigrationUser -BatchId "MigrationBatch001" | Get-MoveRequestStatistics | select DisplayName, StatusDetail PercentComplete | Export-Csv C:\MigrationStatus\UserName.csv -Encoding UTF8 -NTI

For exporting mailbox migration status of all users, run the following command:

Get-MigrationUser -ResultSize Unlimited | select Identity, BatchId, Status, *ItemCount, DataConsistencyScore | Export-Csv C:\MigrationStatus\UserName.csv -Encoding UTF8 –NTI

To export the mailbox migration status report to .xml, you can run the following command:

Get-MigrationBatch -Identity “MigrationBatch001” -IncludeReport -Diagnostic | Format-List | Export-Clixml C:\MigrationStatus\MigrationBatch.xml -Encoding UTF8

Final Thoughts

Exchange Online supports various PowerShell cmdlets that you can use to get and monitor the mailbox migration status of single, multiple, or all users. It helps you confirm if the mailboxes are migrated from on-premises Exchange to Exchange Online. It also helps detect issues that you can resolve to complete the mailbox migration. To avoid or overcome the issues during the mailbox migration, you can use Stellar Converter for EDB—an EDB to PST converter tool that can export all mailboxes and mail items from offline on-premises Exchange database to Office 365 directly in a few clicks. It auto-maps the source and destination mailboxes and allows you to manually map the mailboxes for precise migration with complete integrity.



Was this article helpful?
About The Author
author image
Ravi Singh linkdin Icon

Senior Writer at Stellar®. He is an expert Tech Explainer.

Table of Contents

WHY STELLAR® IS GLOBAL LEADER

Why Choose Stellar?
  • 0M+

    Customers

  • 0+

    Years of Excellence

  • 0+

    R&D Engineers

  • 0+

    Countries

  • 0+

    PARTNERS

  • 0+

    Awards Received