Skip to content

Get mailbox migration status with PowerShell

How do you know which mailboxes are syncing and what the mailboxes progress is? The Microsoft 365 Exchange Admin Center will show you the mailbox migration status, but it’s delayed and not easy to read. Also, when you have more than one migration batch running, it’s much more clear to have the mailbox migration status in a list. This article will show how to get the mailbox migration status and export them to a CSV file.

Introduction

When you sign in to Microsoft 365 Exchange Admin Center, you can find the Migration batches.

It’s essential to keep an eye on the migration status when you migrate mailboxes. When mailboxes fail for any reason, it’s good to fix them. Otherwise, these mailboxes will not complete.

Let’s look at how to get the mailbox migration details with PowerShell.

Connect to Exchange Online PowerShell

Start PowerShell as administrator and Connect to Exchange Online PowerShell.

PS C:\> Connect-ExchangeOnline

Now that you are connected, let’s look at the migration status.

Get migration status single user

Get the migration status of a single user. Run the Get-MigrationUser cmdlet.

PS C:\> Get-MigrationUser "Max.Fraser@exoip.com" | ft  Identity, BatchId, Status, *ItemCount, DataConsistencyScore

Identity             BatchId          Status  SkippedItemCount SyncedItemCount TransferredItemCount DataConsistencyScore
--------             -------          ------  ---------------- --------------- -------------------- --------------------
Max.Fraser@exoip.com MigrationBatch01 Syncing                0              95                   95 Perfect             

Export the migration status of a single user to CSV file.

PS C:\> Get-MigrationUser "Max.Fraser@exoip.com" | select Identity, BatchId, Status, *ItemCount, DataConsistencyScore |  Export-Csv "C:\temp\migration_status_single_user.csv" -Encoding UTF8 -NTI

Get migration status in batch

When you have more than one migration batch and want to get the migration status of that specific migration batch, add the BatchId parameter.

In our example, let’s return the mailboxes in the batch MigrationBatch01.

PS C:\> Get-MigrationUser -ResultSize Unlimited -BatchId "MigrationBatch01" | ft -AutoSize

Identity                  Batch            Status  LastSyncTime         
--------                  -----            ------  ------------         
Max.Fraser@exoip.com      MigrationBatch01 Syncing 12/27/2021 7:56:17 PM
Piers.Bower@exoip.com     MigrationBatch01 Syncing 12/27/2021 7:55:20 PM
Kylie.Davidson@exoip.com  MigrationBatch01 Syncing 12/27/2021 7:55:32 PM
Boris.Campbell@exoip.com  MigrationBatch01 Syncing 12/27/2021 7:54:42 PM
Nicholas.Murray@exoip.com MigrationBatch01 Syncing 12/27/2021 7:58:01 PM
Leonard.Clark@exoip.com   MigrationBatch01 Syncing 12/27/2021 7:59:24 PM
Grace.Rees@exoip.com      MigrationBatch01 Syncing 12/27/2021 7:56:07 PM
Jonathan.Fisher@exoip.com MigrationBatch01 Failed                       
Richard.Grant@exoip.com   MigrationBatch01 Synced  12/27/2021 6:19:17 PM
Ruth.Dickens@exoip.com    MigrationBatch01 Synced  12/27/2021 7:55:45 PM

Get the mailbox migration progress, including percentage complete, add the Get-MoveRequestStatistics cmdlet.

PS C:\> Get-MigrationUser -ResultSize Unlimited -BatchId "MigrationBatch01" | Get-MoveRequestStatistics | ft -AutoSize

DisplayName     StatusDetail                   TotalMailboxSize               TotalArchiveSize PercentComplete
-----------     ------------                   ----------------               ---------------- ---------------
Max Fraser      StalledDueToTarget_DiskLatency 4.611 GB (4,951,080,744 bytes) 0 B (0 bytes)    76             
Piers Bower     Synced                         3.123 GB (3,353,699,761 bytes) 0 B (0 bytes)    95             
Kylie Davidson  Synced                         3.161 GB (3,394,411,992 bytes) 0 B (0 bytes)    95             
Boris Campbell  Synced                         2.863 GB (3,074,205,289 bytes) 0 B (0 bytes)    95             
Nicholas Murray CopyingMessages                4.462 GB (4,791,026,484 bytes) 0 B (0 bytes)    94             
Leonard Clark   Synced                         2.659 GB (2,854,698,417 bytes) 0 B (0 bytes)    95             
Grace Rees      Synced                         2.938 GB (3,154,162,494 bytes) 0 B (0 bytes)    95             

Export the migration status in that specific batch with percentage to CSV file.

PS C:\> Get-MigrationUser -BatchId "MigrationBatch01" | Get-MoveRequestStatistics | select DisplayName, StatusDetail, TotalMailboxSize, TotalArchiveSize, PercentComplete | Export-Csv "C:\temp\migration_status_batch_statistics.csv" -Encoding UTF8 -NTI

Get migration status all users

Get the migration status for all users.

PS C:\> Get-MigrationUser -ResultSize Unlimited | ft Identity, BatchId, Status, *ItemCount, DataConsistencyScore

Identity                  BatchId          Status  SkippedItemCount SyncedItemCount TransferredItemCount DataConsistencyScore
--------                  -------          ------  ---------------- --------------- -------------------- --------------------
Boris.Campbell@exoip.com  MigrationBatch01 Syncing                0             120                  120 Perfect             
Grace.Rees@exoip.com      MigrationBatch01 Syncing                0             119                  119 Perfect             
Jonathan.Fisher@exoip.com MigrationBatch01 Failed                 0               0                    0                     
Kylie.Davidson@exoip.com  MigrationBatch01 Syncing                0             128                  128 Perfect             
Leonard.Clark@exoip.com   MigrationBatch01 Syncing                0             110                  110 Perfect             
Max.Fraser@exoip.com      MigrationBatch01 Syncing                0              95                   95 Perfect             
Nicholas.Murray@exoip.com MigrationBatch01 Syncing                0             136                  136 Perfect             
Piers.Bower@exoip.com     MigrationBatch01 Syncing                0             112                  112 Perfect             
Richard.Grant@exoip.com   MigrationBatch01 Synced                 0             325                  325 Perfect             
Ruth.Dickens@exoip.com    MigrationBatch02 Synced                 0             120                  120 Perfect             
Sarah.Coleman@exoip.com   MigrationBatch02 Syncing                0             132                  132 Perfect             
Sebastian.Nolan@exoip.com MigrationBatch02 Synced                 0             145                  145 Perfect             
Simon.Berry@exoip.com     MigrationBatch02 Synced                 0             230                  230 Perfect             

Export the migration status for all users to CSV file.

PS C:\> Get-MigrationUser -ResultSize Unlimited | select Identity, BatchId, Status, *ItemCount, DataConsistencyScore | Export-Csv "C:\temp\migration_status_all_users.csv" -Encoding UTF8 -NTI

Get the mailbox migration progress, including percentage complete, add the Get-MoveRequestStatistics cmdlet.

PS C:\> Get-MigrationUser -ResultSize Unlimited | Get-MoveRequestStatistics | ft -AutoSize

DisplayName     StatusDetail   TotalMailboxSize               TotalArchiveSize PercentComplete
-----------     ------------   ----------------               ---------------- ---------------
Boris Campbell  Synced         2.863 GB (3,074,205,289 bytes) 0 B (0 bytes)    95             
Grace Rees      Synced         2.938 GB (3,154,162,494 bytes) 0 B (0 bytes)    95             
Kylie Davidson  Synced         3.161 GB (3,394,411,992 bytes) 0 B (0 bytes)    95             
Leonard Clark   Synced         2.659 GB (2,854,698,417 bytes) 0 B (0 bytes)    95             
Max Fraser      Synced         4.611 GB (4,951,080,744 bytes) 0 B (0 bytes)    95             
Nicholas Murray Synced         4.462 GB (4,791,026,484 bytes) 0 B (0 bytes)    95             
Piers Bower     Synced         3.123 GB (3,353,699,761 bytes) 0 B (0 bytes)    95             
Richard Grant   WorkItemPickup 38.93 MB (40,818,048 bytes)    0 B (0 bytes)    95             
Ruth Dickens    Synced         2.287 GB (2,455,410,084 bytes) 0 B (0 bytes)    95             

Export the migration status with percentage to CSV file.

PS C:\> Get-MigrationUser -ResultSize Unlimited | Get-MoveRequestStatistics | select DisplayName, StatusDetail, TotalMailboxSize, TotalArchiveSize, PercentComplete | Export-Csv "C:\temp\migration_status_all_users_statistics.csv" -Encoding UTF8 -NTI

That’s it!

Read more: Complete migration batch with PowerShell »

Conclusion

You learned how to get mailbox migration status with PowerShell. The best way to retrieve the mailbox migration status is with PowerShell. It will fetch the status instantly, and there is no delay. As of last, exporting the results to a CSV file is easier to read, and you can send the CSV file to the team and keep them up to date.

Did you enjoy this article? You may also like Complete individual mailbox move request from migration batch. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 2 Comments

  1. Is there a command to see the verbiage as to why a use migration has failed? My O365 admin console will not display any information for a particular batch, but I know a mailbox has failed.

Leave a Reply

Your email address will not be published. Required fields are marked *