How to use the export mailbox migration information and troubleshooting PowerShell script | Part 5#5 5/5 (5) 7 min read

In the following article, we review how to use the “Export mailbox migration information and troubleshooting” PowerShell script.

The PowerShell script structure

The menu PowerShell script is dived to couple of sections that we will review later in the article.

The PowerShell script was designed to work in two different environments: Office 365 (Exchange Online) and On-Premises environment that include On-Premise Active Directory and Exchange On-Premises.

  • The part that marked as “A” in the screenshot, include the menu options that relates to the Exchange Online infrastructure.
  • The part that marked as “B” in the screenshot, include the menu options that relates to the On-Premise environment.

Export mailbox migration information and troubleshooting PowerShell script – structure -01

Menu 1 – Login to Exchange Online using Remote PowerShell

This menu option will start a remote PowerShell session with Exchange Online.

Login to Exchange Online using Remote PowerShell -01

You will need to provide your Office 365 Global Administrator credentials.

Login to Exchange Online using Remote PowerShell -02

SECTION A: Export mail migration information

The PowerShell menu options in this section, will export information about the various mailbox migration “entities” in a bulk mode.

For example, in case that you run multiple mail migration batches, the below menu options, will export information about ALL the existing migration batched, all migration users, all move requests and so on.

Exported file information

  • The information will be exported to the following file formats: TXT, CSV, HTML and XML.
  • The PowerShell script will automatically create the following folder structure C:\INFO\Mail migration Logs\A-BULK which will contain the exported files.

Menu 2 – Export information about – ALL Migration batches + EndPoints (Bulk Mode)

This menu option, export information about all existing Migration batches + All existing + EndPoints.

The PowerShell commands that are executed by the menu option are:

  • Get-MigrationBatch -IncludeReport -Diagnostic
  • Get-MigrationBatch

Menu 3 – Export information about – ALL Move requests (Bulk Mode)

To demonstrate the process of exporting information to various file type, we use “menu 3” as an example (all the rest of the menu option that export data to file operate in the same manner).

This menu option, export information about all existing move requests + move request statistics.

The PowerShell commands that are executed by the menu option are:

  • Get-MoveRequest
  • Get-MoveRequestStatistics

Menu 3 - Export information about - ALL Move requests -Bulk Mode -01

When we type “3” and “ENTER”, the menu option will automatically start to collect the required information and export the information to various file type.

In the following screenshot, we can see the different information “parts” that appear on the PowerShell console.

  • Part 1 – this part is use for, providing a short explanation about what is the specific PowerShell menu option “do”.
  • Part 2 – this part is use for providing information about – the folder hierarchy that will be created by the PowerShell command. This folder will use for storing the exported files.
  • Part 3 – this part is use for providing information about – the PowerShell command that are executed by the menu option.
  • Part 4 – this part is use for displaying information about the folders that are created by the PowerShell menu option.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -02

In the following screenshot, we can see the folder structure that was created. In our scenario, the information about the move requests is stored in two different
folders: “3. MoveRequest” and “4. MigrationStatistics“.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -03

The information about the Move Requests was exported to three different file formats: TXT, CSV, and HTML.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -04

In the following screenshot, we can see an example of the HTML report that includes information about all existing Move Requests.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -05

In the following screenshot, we can see an example of the HTML report that is stored in the second Directory – “4. MigrationStatistics“, that include information about all existing Move Requests Statistics.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -06

In the following screenshot, we can see an example of the CSV file that includes information about all existing Move Requests.

Menu 3 - Export information about - ALL Move requests -Bulk Mode -07

Menu 4 – Export information about – ALL Migration users (Bulk Mode)

This menu option, export information about all existing migration users + existing migration user’s statistics.

The PowerShell commands that are executed by the menu option are:

  • Get-MigrationUser
  • Get-MigrationUserStatistics -IncludeReport -Diagnostic -IncludeSkippedItems

SECTION B: Export mail migration information – Specific USER

Menu 5 – Export mail migration information for a Specific Migrated USER

The purpose of this menu option is, to get a detailed report about specific “migrated user account”.

The PowerShell commands that are executed by the menu option are:

  • Get-MigrationUser <User>
  • Get-MigrationUserStatistics -IncludeReport -Diagnostic -IncludeSkippedItems <User>
  • Get-MoveRequest <User>
  • Get-MoveRequestStatistics <User>

Exported file information

  • The information will be exported to the following file formats: TXT, XML and HTML
  • The files will be saved in the following path: C:\INFO\Mail migration Logs\B- Migration Users\<User Name>

SECTION C: Export mail migration information Specific migration batch

Menu 6 – Export mail migration information Specific migration batch

The purpose of this menu option is, to get a detailed report about specific “migration batch”.

The PowerShell commands that are executed by the menu option are:

  • Get-MigrationBatch <Migration BATCH name> -IncludeReport -Diagnostic
  • Get-MigrationUser

Exported file information

  • The information will be exported to the following file formats: TXT, XML and HTML
  • The files will be saved in the following path: C:\INFO\Mail migration Logs\C- Migration Batch Information – <Migration BATCH name>

SECTION D: On-Premise Environment

This menu section is dedicated to the on-Premises environment.

In some scenario of troubleshooting mail migration from on-Premises infrastructure, we need to get information about “on-Premises objects” such as On-Premise Active Directory user accounts and Exchange on-Premises mailboxes.

Menu 7 – Export information about On-Premise Active Directory Specific user account

The PowerShell command that are executed by the menu option IS:

Exported file information

  • The information will be exported to the following file formats: TXT, XML and HTML
  • The files will be saved in the following path: C:\INFO\D. On-Premise information\1.On-Premise Active Directory
Note – the following PowerShell command, should be executed from the On-Premise environment, using a Domain controller server or a server that include Active Directory PowerShell cmdlets.

Menu 8 – Export information about Exchange on-Premises mailboxes

The PowerShell commands that are executed by the menu option are:

  • Get-Mailbox <Recipient name>
  • Get-MailboxStatistics <Recipient name>

Exported file information

  • The information will be exported to the following file formats: TXT, XML and HTML
  • The files will be saved in the following path: C:\INFO\D. On-Premise information\2.Exchange on-Premises
Note – the following PowerShell command, should be executed from the On-Premise environment, using an Exchange on-Premises PowerShell.

SECTION E: Exchange on-Premises tasks

The following section is dedicated to “troubleshooting procedure” that relate to the Exchange on-Premises infrastructure

Menu 9 – Test the Exchange on-Premises MRS Proxy service

Menu 10 – Run mailbox repair

This menu option will run MailboxRepairRequest for a specific mailbox

Menu 11 – Copy IIS log files

Exported file information

  • The information will be exported to the following file formats: TXT,
  • The files will be saved in the following path: C:\INFO\Exchange on-Premises information\IIS Log files



Using PowerShell for view and export information about mailbox migration to Office 365

The following PowerShell script will help you in a scenario in which you perform mailbox migration from your Exchange On-Premise environment to Office 365 (Exchange Online).
The PowerShell script includes various menus that will export information about a specific migrated mailbox, specific migration batch, information about migration endpoints and more.

You can find additional information about the subject of exporting information about mailbox migration in the following articles:

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

Restore Exchange Online mailbox | Article series index

Summary
How to use the export mailbox migration information and troubleshooting PowerShell script | Part 5#5
Article Name
How to use the export mailbox migration information and troubleshooting PowerShell script | Part 5#5
Description
In the following article, we review how to use the “Export mailbox migration information and troubleshooting” PowerShell script.
Author
Publisher Name
o365info.com
Publisher Logo

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 *