move exchange mailboxes to another database

Moving Exchange Mailboxes to Another Database


Exchange administrator can move user mailboxes in the Active Directory forest from one database to another between Exchange servers, or between mailbox databases on the same server through the Exchange Admin Center web interface or PowerShell CLI. Consider how to migrate mailboxes between databases using Exchange Management PowerShell in Exchange 2016/2013/2010.

To move the mailbox from one database to another, you need to create a move request (if a migration occurs within the same Active Directory forest, this is called a local move request, if you want to move a mailbox between AD forests—this is a remote move request). To move user mailbox the New-MoveRequest cmdlet is used.

To create a local move request for a specific user’s mailbox, run the following command:

New-MoveRequest -Identity jsmith@theitbros.com -TargetDatabase lonDB2 -BadItemLimit 100

Moving Exchange Mailboxes to Another Database

The TargetDatabase parameter specifies the name of the mailbox database to which the mailbox should be moved. The BadItemLimit parameter indicates the number of corrupted items that can be skipped when moving a mailbox. If you specify BadItemLimit 0, it means that if there are any corrupted items in the mailbox, the move request will end with an error and the mail will remain in the original mail database.

If the mailbox size is quite large, it can move between mailboxes for quite a long time. To track the percentage of mailbox migration, you can use the Get-MoveRequestStatistics cmdlet. For example, to get the status of the jsmith@theitbros.com mailbox transfer, run the command:

Get-MoveRequestStatistics -Identity jsmith@theitbros.com

how to move Exchange Mailboxes to Another Database

Pay attention to the PercentComplete column—it indicates the percentage of the task completion. The total mailbox size is listed in the TotalMailboxSize column.

You can get statistics on all move requests as follows:

Get-MoveRequest | Get-MoveRequestStatistics

You can move all mailboxes in a specific database to another database. For the convenience of tracking the status of a move, you can specify the name of the batch move task (BatchName parameter):

Get-Mailbox -Database lonDB1 | New-MoveRequest -BatchName "lonDB1tolonDB2” -TargetDatabase lonDB2 -Priority High -BadItemLimit 50 –AcceptLargeDataLoss

The status of batch move task can be obtained as follows:

Get-MoveRequest -BatchName lonDB1tolonDB2 | Format-List DisplayName,Alias,Status,*database*

You can temporarily suspend the transfer of mailboxes with the command:

Get-MoveRequest | ? {$_.Batchname –like “*lonDB1tolonDB2”}|Set-MoveRequest –SuspendWhenReadytoCompleate

To continue the mailbox transfer run:

Get-MoveRequest | ? {$_.Batchname –like “*lonDB1tolonDB2”}|Resume-MoveRequest

Exchange Mailboxes to Another Database

To migrate all mailboxes from a specific MBX server, use the command:

Get-Mailbox -Server exlonmbx1 | New-MoveRequest -TargetDatabase nyDB2

If the database has system mailboxes, they need to be transferred separately:

Get-Mailbox -Database lonDB1 -Arbitration | New-MoveRequest -TargetDatabase lonDB2

You can batch move multiple mailboxes using a CSV file. To do this, use the New-MigrationBatch cmdlet (available in Exchange Server 2013, Exchange Server 2016, Exchange Server 2019, Exchange Online).

New-MigrationBatch -Local -AutoStart -AutoComplete -Name "lonDBMove01" -CSVData ([System.IO.File]::ReadAllBytes("C:\PS\lonDBMove01.csv")) -TargetDatabases lonDB2 -BadItemLimit 10

The CSV file lonDBMove01.csv must contain a list of mailboxes to move (if you want to transfer only the archive mailbox, use the MailboxType parameter—ArchiveOnly, if the main mailbox—PrimaryOnly).

You may also like:

Add An Out Of Office Message In Outlook for A Diff... Did an employee just leave for vacation and forget to do something? Below the instructions will show you how to add an out of office message in Outloo...
How to Recreate Virtual Directories OWA and ECP on... This article describes how to recreate virtual directories OWA and ECP on Exchange 2016. The rebuilding of these virtual directories helps to reset al...
How to Add or Remove SMTP Alias to Exchange 2016 M... Sometimes you need to add another email address to the existing user. In Exchange, in addition to the primary address, each mailbox can be assigned to...
Exchange 550 5.7.1 RESOLVER.RST.AuthRequired; auth... We have faced the following error when were trying to send an email outside organization to the (from the Gmail) to a distribution group (list) or a p...
Managing Mailbox Size and Quota on Exchange Server... One of the important tasks of an Exchange administrator is controlling mailbox sizes. It is very difficult to force users to voluntarily limit the siz...

Add Your Comment