Solved

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

Posted on 2013-06-06
8
3,479 Views
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".
0
Comment
Question by:tomfontanilla
  • 4
  • 3
8 Comments
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 200 total points
Comment Utility
Try...
Get-Mailbox -database DB01 | Move-Mailbox -TargetDatabase DB02 -MaxThreads 10

Open in new window

0
 
LVL 9

Accepted Solution

by:
Marshal Hubs earned 300 total points
Comment Utility
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.
0
 

Author Comment

by:tomfontanilla
Comment Utility
Experts, your recommendation is great. The only problem is that i also need to point to which storage group. Please advise.
0
 
LVL 40

Expert Comment

by:Subsun
Comment Utility
Get-Mailbox -database "Server name\Storage Group\DB01" | Move-Mailbox -TargetDatabase "Target Server\Storage Group\DB02" -MaxThreads 10

Open in new window

0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:tomfontanilla
Comment Utility
Looks good, I will try this tonight.
0
 

Author Comment

by:tomfontanilla
Comment Utility
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
0
 
LVL 40

Expert Comment

by:Subsun
Comment Utility
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

0
 

Author Closing Comment

by:tomfontanilla
Comment Utility
Great Response
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now