How to Move All Mailboxes from One Database to Another?

In Exchange Server, we can create multiple databases to split mailboxes for policy creation, for common quotas, to distribute them on various drives for performance, and other reasons. These things are created at the time of installation of the Exchange Server, for example, setting up a new Exchange Server. As the business grows or changes its requirements, these would need to be updated or changed.

How to Move All Mailboxes from One Database to Another?

How to Move All Mailboxes from One Database to Another?

Here are the topics we will cover to help you move the mailboxes between databases.

  • Moving All Mailboxes at Once
  • Checking the Status of the Move
  • Limitations
  • Alternative Solution

The Exchange Server Standard version allows a limit of five databases, while the Exchange Server Enterprise license allows having limitless databases. However, it depends on the business needs and the pricing of the license.

Here, we will be going through the process of moving all the mailboxes from one database to a new database on the Exchange Server, especially if you have setup a new Exchange 2019 Server.

Moving All Mailboxes at Once

First, we must understand what we have and what will be migrated. To migrate a single mailbox from one database to another, we can use the New-MoveRequest command. However, to move all the mailboxes at once, we need first to get the list of all the mailboxes. For each mailbox, run the below command to start a move request to the target database.

Get-Mailbox -Database "<source database>" -ResultSize Unlimited | New-MoveRequest -TargetDatabase "<destination database>"

This will go through all the databases mentioned and move each user’s mailbox to the target database. The downside of this operation is that if there are many mailboxes with huge data, it will eat up the server’s performance and storage performance.

Since all the mailboxes will be moved at once, this will create a huge workload on the server. Even if the server has high performance with SSD disks, it will still hog all the resources, which could hinder the server’s performance and ultimately limit user access.

To move the public folders, we need to modify the command by adding the PublicFolder parameter to the Get-Mailbox statement.

Get-Mailbox -Database "<source database>" -PublicFolder -ResultSize Unlimited | New-MoveRequest -TargetDatabase "<destination database>"

Checking the Status of the Move

To check the status of the move request of all the users in the database, we need to use the Get-MoveRequest PowerShell command in the Exchange Management Shell (EMS).


Clean up the Move Requests

After the mailbox move is complete, the request is not cleared from the Get-MoveRequest list. We need to run the following command to clear off the completed move requests.

Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest -Confirm:$false

If we run the Get-MoveRequest command again, we will only see the ones that are in progress or failure. This will make it easier to troubleshoot any failed mailbox moves.

To remove the failed requests, we need to run the command given below.

Get-MoveRequest -MoveStatus Failed | Remove-MoveRequest -Confirm:$false

Limitations of the Above Method

With the above method, we can move all mailboxes to another database using the Exchange Management Shell (EMS). However, this has a few limitations and constraints.

Using this method, we will create a large bottleneck on the server. Since all mailboxes will be transferred at once, we cannot be selective or move the mailboxes at a steady pace.

Also, we might encounter issues when trying to move users with archives, shared mailboxes with archives, and disabled mailboxes. We need to re-activate the disabled mailboxes to move them. This will involve creating a new Active Directory user and associating the user with the disabled mailbox.

With the above method, we will not be able to move from one Exchange Server environment to another. This will only allow to move to another database in the same server or another server in the same Exchange infrastructure.

Alternative Solution – Use Third Party Application

With applications such as Stellar Converter for EDB, you can open multiple EDB files from any version of Exchange Server – from 2007 till 2019. You can browse the databases with no size limit and granularly export to PST and other formats. With the help of this EDB to PST Converter, you can easily export mailboxes, system mailboxes, archives, shared mailboxes, and public folders.

EDB to PST Convertor

You can export directly to live databases of any Exchange Server version. It offers features such as parallel exports to optimize the performance, priority export for the critical mailboxes, a continuation of export in case of interruption, and automatic/manual mapping of users from the source to the destination. It can also be a migration tool from on-premises Exchange to Office 365.

A die-hard fan of Windows, PC Gaming, and Xbox. He is a seasoned content writer with over 15 years of experience in the industry. He is a specialist in writing about Windows, software reviews, troubleshooting Windows, and automation.


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.