MSExchangeGuru.com

Learn Exchange the Guru way !!!

 

Exchange 2013 Batch Mailbox Migration

Let’s do a deep dive on Exchange 2013 mailbox moves. In Exchange 2013 the move mailbox is called as ‘Migration Batches’ and every mailbox move will have a batch name.

Either the mailbox move can be for a single user or for bunch of users; local move or remote move, there will be a batch name. Exchange 2013 move request uses “Migration.8f3e7716-2011-43e4-96b1-aba62d229136″ arbitration mailbox to store the details such as batch information, migration user details etc.

In earlier version of Exchange servers, the transaction logs which generate while moving the mailboxes use to store under source /destination databases, but in Exchange 2013 transaction logs will store under the database where “Migration.8f3e7716-2011-43e4-96b1-aba62d229136″ arbitration mailbox  is located. By default transaction logs will generate more in 2013, manage the database during the mailbox movement we can use the below workaround:

  • Enable circular logging on the mailbox database where arbitration mailbox is hosted.
    • Increase the volume size of the database and run the backup regularly to purge the logs files
    • Use New-move request instead of batch move.

NOTE:

Though the name says batch move, the number of mailboxes can be moved at a time is limited by the value mentioned in the file MSExchangeMailboxReplication.exe.config under the path ExchangeinstallationpathProgramfilesMicrosoftExchangeServerV15BinMSExchangeMailboxReplication.exe.config file on Mailbox server which is same as in Exchange2010.

We will see how to move the mailboxes in Exchange 2013 using EAC and Shell command:

Before we begin with the mailbox movement, we need to check if the mailbox is ready to move:

New-MoveRequest –Identity <username> –TargetDatabase <Databasename> –WhatIf


WhatIf command will check the mailbox and will confirm if there any errors with the mailbox as shown: You can see for the user Test4, there is not issues, but for the user Matt there is an error to move the mailbox.

Using EAC:

Open EACàRecipientsà Mailboxesàselect the mailbox which you want to move and select Move mailbox to another database on Right hand side


                   OR

Open EACàRecipientsà Migrationàclick on the + and select the option either move to a different database or Move to this forest.


Under New local move mailbox window we have 2 options to select the users:

  • Select individual users to move
  • Import the users from a CSV file(if you have multiple users)


In New local move window, we need to specify the Batch name for the movement.

We have options to move both Primary and Archive mailbox at the same time or only Archive mailbox or only Primary mailbox.

Provide the target database and the bad Item limit


Bad Item Limit: This is the number of bad items to skip while moving the mailbox. Recommended value is 0 which is by default. If the Bad Item limit value is more, we need to use AcceptLargeDataLoss parameter, otherwise the mailbox will fail to move.

Specify the account to receive the migration status report, once the migration is completed. Also we can select the options whether migration should start and end manually/automatically and click on New.


You can find the Alert and the status of the migration under EAC as below:



You can find the report sent to Administrator under OWA as below:

Using EMS:

To move all the mailboxes under one database to another:

Get-Mailbox –Database <Databasename> | New-MoveRequest –BatchName <LocalMove2> –SuspendWhenReadyToComplete

From the above screenshot you can see that the move status is Autosuspended at 95%.

To resume and complete the backup use the below command:

Get-MoveRequest “batchname” | Set-MoveRequest –SuspendWhenReadyToComplete $false

Get-MoveRequest “Batchname” | Resume-MoveRequest

NOTE: You can use different switches depending on the requirements.

We will see how we can use CSV file to move the multiple mailboxes:

New-MigrationBatch –Local –Name LocalMove3 CSVData ([System.IO.File]::ReadAllBytes(“C:UsersAdministrator.MSEXchangeGuruDesktopMigration.csv”)) –TargetDatabase Database12013 

Start-MigrationBatch –Identity LocalMove3

Complete-MigrationBatch LocalMove3


Use the below command to start and complete the move automatically: Same way we can add the different switches as per the requirement.

New-MigrationBatch –Local –Name LocalMove3 CSVData ([System.IO.File]::ReadAllBytes(“C:UsersAdministrator.MSEXchangeGuruDesktopMigration.csv”)) –TargetDatabase Database12013 -Autostart -AutoComplete


The CSV file format should be as below:

The report can be viewed under EAC as below:

Move the Exchange 2010 System Mailbox to Exchange 2013

The system mailbox is the one in which the organization-wide data like Admin audit data, metadata for eDiscovery searches and unified messaging data will be stored. The System mailbox is named as SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9} and the display name as Microsoft Exchange.

When we upgrade the Exchange organization to Exchange2013, we need to move the system mailbox as well; otherwise we will face issues while running Search-AdminAuditLog to export the Administrator Audit log and we cannot run eDiscovery searches using EAC.

We can use either EAC or Shell command to move the system mailbox, I prefer EMS:

First we need to get the details of the system mailbox and the databases, run the below commands to get the information:

Get-Mailbox -Arbitration | FL Name,DisplayName,ServerName,Database,AdminDisplayVersion
Get-MailboxDatabase -IncludePreExchange2013 | FL Name,Server,AdminDisplayVersion

Once we get all the details, we need to move the System mailbox using the below command:
Get-Mailbox -Arbitration -Identity "SystemMailbox{e0dc1c29-89c3-4034-b678-e6c29d823ed9}" | New-MoveRequest -TargetDatabase Database12013

Verify if the movement is successful using the below command:

Get-Mailbox -Arbitration | FL Name,DisplayName,ServerName,Database,AdminDisplayVersion


Ratish Nair

Microsoft MVP | Exchange Server

Team @MSExchanegGuru

14 Responses to “Exchange 2013 Batch Mailbox Migration”

  1. Dan Says:

    At the top of your page you are missing the T in TargeDatabase
    Otherwise looks good!

    New-MoveRequest –Identity –TargeDatabase –WhatIf

  2. Prabhat Nigam Says:

    @Dan – Thank you. We have updated the command.

  3. Mino Says:

    Hi,
    in your script for migration there are some errors:
    CSVData= -CSVData and C:UsersAdministrator.MSEXchangeGuruDesktopMigration.csv= C:\Users\Administrator\MSEXchangeGuruDesktopMigration.csv

    Also I would put these parameters, by having a full script as follows:

    New-MigrationBatch –Local –Name LocalMove1 -CSVData ([System.IO.File]::ReadAllBytes(“C:\temp\MSEXchangeGuru.csv”)) –TargetDatabase Database2013 -AutoRetryCount 3 -BadItemLimit 6 -Autostart -AutoComplete -NotificationEmails user@domain.com,administrator@domain.com

  4. Steven Says:

    Hi Prabhat,

    I need to enable circular logging on my databases in a 3-node DAG. Do I need to move the DB off the Active Server to a Passive Server prior to restarting the Information Store Service?

    Thanks,
    Steven

  5. Prabhat Nigam Says:

    Hey Steven,
    It will be better if you move the DB manually.

  6. Prabhat Nigam Says:

    Thank u Mino. when you sync with wordpress some of the characters it removes. Thank you for correcting us.

  7. Faic Says:

    Hi PN: I refer to this command on your guide above:
    To move all the mailboxes under one database to another:
    Get-Mailbox –Database | New-MoveRequest –BatchName –SuspendWhenReadyToComplete

    What’s the command to move all mailboxes in one database to another in exch2013 server?

    many thanks

  8. Prabhat Nigam Says:

    Get-Mailbox –Database – This is pulling all mailboxes from one database.
    New-MoveRequest –BatchName –SuspendWhenReadyToComplete – this is moving them but assign a targetdatabase.
    SuspendWhenReadyToComplete – If it is true migration will stop at 95%.

  9. Faic Says:

    Hi PN:

    I was recently migrating mailboxes from exch2013 to DAG environment(two servers with 6 databases)and since yesterday and today, the status-details for all mailboxes migration shows “StatusDueToHA” and takes are long time and then sometimes showing status as “copyingMessages”. Why could this happen? So migration of mailboxes have been very slow.

    many thanks

  10. Bashab Ganguly Says:

    Can anyone send me a .CSV file format required for Hybrid Exchange Migration, from Exchange 2010 to Office 365 using Exchange 2013 Hybrid CAS & MB server. need the format for .csv migration batch file. Please sens an example file…

    Regards
    Bashab

  11. Bashab Ganguly Says:

    Please send at bashab,ganguly@atos.net

  12. mir Says:

    .CSV format is simple
    Note Header for CSV file should be: “EmailAddress” and fallowed by email address.
    e.g.,
    EmailAddress
    thomas.do@abc.com
    richard.turner@abc.com

  13. Oscar Garcia Says:

    HI Prabhat

    what happend with incoming emails when a mailbox is in migration progress and it status is copyingMessages ?

  14. Prabhat Nigam Says:

    It stays in the queue.

Leave a Reply

Categories

Archives

MSExchangeGuru.com