Solved

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

Posted on 2013-06-06
8
3,818 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
[X]
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
  • 4
  • 3
8 Comments
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 200 total points
ID: 39227709
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
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.
0
 

Author Comment

by:tomfontanilla
ID: 39228724
Experts, your recommendation is great. The only problem is that i also need to point to which storage group. Please advise.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 40

Expert Comment

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

Open in new window

0
 

Author Comment

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

Author Comment

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

Expert Comment

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

0
 

Author Closing Comment

by:tomfontanilla
ID: 39235426
Great Response
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

749 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