Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Move exchange 2007 mailboxes from one DB to another DB on different Exchange server

Posted on 2013-06-06
Last Modified: 2013-06-10
I'm looking for a powershell command to bulk move mailboxes in Exchange 2007.  I want to move them from one server "DB" to my new Exchange server "DB".
Question by:tomfontanilla
  • 4
  • 3
LVL 40

Assisted Solution

Subsun earned 200 total points
ID: 39227709
Get-Mailbox -database DB01 | Move-Mailbox -TargetDatabase DB02 -MaxThreads 10

Open in new window


Accepted Solution

Marshal Hubs earned 300 total points
ID: 39228192
To move a single exchange 2007 mailbox within powershell from one database to another you would use the following command.

Move-mailbox –identity “%username%” –targetdatabase “%DB%”
This would be the equivalent of right clicking on a user object with the exchange console and choosing move mailbox. However the real power of powershell comes into play when you want to move multiple mailboxes from one database to another. In order to do that you would combine the move-mailbox cmdlet with get-mailbox. A simple usage would be something like.

Get-mailbox | move-mailbox –targetdatabase “%DB%”
This would move all mailboxes on the exchange server to the target database, however you may find that you already have a few mailboxes on the target database or you want to move users from a specific database to another database (if you had 3 databases for example). For this you could use:

Get-mailbox –database “%sourceDB%” | move-mailbox –targetdatabase “%DB%”
This would ensure that all mailbox from the source database are moved to the target. This process is not quick however as it opens each mailbox and creates another at the target then moves messages and folders across to the target. If you specify more than one user (or like above feed the move-mailbox mailboxes as multiple variables) then exchange will move 4 mailboxes at a time. During the move the mailboxes being copied will not be available whilst they are transferred.

Author Comment

ID: 39228724
Experts, your recommendation is great. The only problem is that i also need to point to which storage group. Please advise.
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

LVL 40

Expert Comment

ID: 39228769
Get-Mailbox -database "Server name\Storage Group\DB01" | Move-Mailbox -TargetDatabase "Target Server\Storage Group\DB02" -MaxThreads 10

Open in new window


Author Comment

ID: 39230757
Looks good, I will try this tonight.

Author Comment

ID: 39230767
Can you please cofirm this.

Get-Mailbox -database "server\Small Companies\Small Companies_DB" | Move-Mailbox  –identity "username"-TargetDatabase "Target server\Capacity Covergae Small Companies\Small Companies" -MaxThreads 10
LVL 40

Expert Comment

ID: 39230777
If you want to move all mailboxes from one DB to another then you don't have to specify –identity "username" in command..
Get-Mailbox -database "server\Small Companies\Small Companies_DB" | Move-Mailbox -TargetDatabase "Target server\Capacity Covergae Small Companies\Small Companies" -MaxThreads 10 

Open in new window


Author Closing Comment

ID: 39235426
Great Response

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question