Using PowerShell for view and export information about mailbox migration to Office 365 | Part 3#5 5/5 (2) 9 min read

In the current article and the next article, we review the various PowerShell cmdlets that we can use for viewing and export information about the process of Exchange mailbox migration process.

The “mailbox migration” PowerShell commands that we review in this article are:

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

1. Migration batches | Get-MigrationBatch

The term – “Migration Batch”, define an entity that serve as a “logical container”, that contain the mailboxes (and their associated users), that we migrate from the source Exchange server to the destination Exchange server (Exchange Online in our scenario).

Get information about specific migration batch

PowerShell command syntax

PowerShell console output example

Export detailed information about specific migration batch | TXT file

Export detailed information about ALL migration batches

Export information to TXT file

Export information to XML file

Migration batch status

Using the “Status” parameter, we can get information about existing migration batch that has a specific “Status”.

The migration batch type of “Statuses” value could be as follow:

  • Completed
  • CompletedWithErrors
  • Completing
  • Corrupted
  • Created
  • Failed
  • IncrementalSyncing
  • Removing
  • Starting
  • Stopped
  • Syncing
  • Stopping
  • Synced
  • SyncedwithErrors
  • Waiting

To view a migration batch with a specific status, we can use the following PowerShell syntax

Display all migration batch with status such as “Completed”

PowerShell command example

PowerShell console output example

Export information about all migration batch with the status “Not Completed” | TXT file

PowerShell command example

3. Move requests

The term – “Move request”, define the Exchange mailbox that we migrate from the “source Exchange server” to the “destination Exchange server”.

The two PowerShell cmdlets that we use for getting information about the move requests of the “mailbox entity” are:

  • Get-MoveRequest
  • Get-MoveRequestStatistics

2. Using the Get-MoveRequest command

The PowerShell command Get-MoveRequest, get a basic information about a property of a specific mailbox that we migrate.

Get information about specific Move Request

PowerShell command syntax

PowerShell console output example

Export information about specific Move Request | TXT file

Get information about ALL existing Move mailbox requests

When we use the PowerShell, command Get-MoveRequest without relating to a specific move request, meaning, without specifying the identity of a specific move request, the PowerShell command will display information about ALL existing “Move Requests”.

General note – in case that you are performing mailbox migration that include tens or hundreds of mailboxes, the process of exporting information about each of these migrated mailboxes, could take a long time.

Export information about ALL Move Requests | TXT file

PowerShell command example

Export information about MoveRequest with specific status

Each of the “move requests” could have a specific “status” such as – Completed ,Failed and so on.

The available status codes values are as follow:

  • AutoSuspended
  • Completed
  • CompletedWithWarning
  • CompletionInProgress
  • Failed
  • InProgress
  • None
  • Queued

In case that you want to get information only about specific status of “Move requests”, you can use the following PowerShell syntax:

Export information about ALL Move Requests which their status is not “completed” | TXT file

Export information about ALL Move Requests which their status is – “Failed” | TXT file

PowerShell command example

3. Using the MoveRequestStatistics command

The purpose of the PowerShell command Get-MoveRequestStatistics, is to get detailed information about the “migrated mailbox content”.

For example,

ItemsTransferred – information about the number of mail items, that was already transferred.

PercentComplete – as the name implies, information about the “Complete percentage” of the mailbox migration process.

Get move requests Statistics information for specific Move Request

PowerShell command syntax

PowerShell console output example

Export information about specific move requests Statistics | TXT file

If we want to eliminate unmercenary data and get a “clear view” of the mailbox migration Statistics, we can ask from PowerShell to display only specific data fields.

PowerShell command example

Combine the Get-MoveRequest + Get-Moverequeststatistics commands

A nice option that we can use when using PowerShell is a “combination” of two or more PowerShell command. The formal term for this method is “pipeline”.

In the following scenario, we a combination of two PowerShell commands:

  • Get-MoveRequest
  • Get-MoveRequestStatistics

The first command Get-MoveRequest will “fetch” all the existing “Move Requests”.

The second command Get-MoveRequestStatistics, will use the “move requests list” form the first command, and add the “statistics information” for each mailbox move requests.

Combine the Get-MoveRequest + Get-Moverequeststatistics commands

PowerShell command syntax

PowerShell console output example

Get + Export information about ALL concurrent move requests Statistics + troubleshooting information

In this scenario, we add the additional parameters- “IncludeReport” and “Diagnostic” for getting more details about the Move Request Statistics.
Most of the times, we will use this additional parameter is a troubleshooting scenario.

In addition, I add an example of- exporting information to XML file because in case that we need to deliver the exported information to Microsoft support for further analysis, this is the “preferred” file format.

Combine the Get-MoveRequest + Get-Moverequeststatistics commands

Export information to TXT file

Export information to CSV file

Export information to XML file

Other variation of the PowerShell command syntax that we can use for getting information about move requests with a specific status such as Failed move requests + statistics information about each move requests could be:

PowerShell command example


For your convenience, I have “Wrapped” all the PowerShell commands that were reviewed in the article,
in a “Menu Based” PowerShell Script.

You are welcome to download the PowerShell script and use it.
Download -o365info PowerShell Script

Using PowerShell for view and export information about mailbox migration to Office 365
In case you want to get more detailed information about how to use the o365info menu PowerShell script, you can read the following article

Now it’s Your Turn!
It is important for us to know your opinion on this article

Restore Exchange Online mailbox | Article series index

Print Friendly

Related Post

Please rate this

Eyal Doron on EmailEyal Doron on FacebookEyal Doron on GoogleEyal Doron on LinkedinEyal Doron on PinterestEyal Doron on RssEyal Doron on TwitterEyal Doron on WordpressEyal Doron on Youtube
Eyal Doron
Share your knowledge.
It’s a way to achieve immortality.
Dalai Lama

Leave a Reply

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