?
Solved

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

Posted on 2013-06-06
8
Medium Priority
?
4,050 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 800 total points
ID: 39227709
Try...
Get-Mailbox -database DB01 | Move-Mailbox -TargetDatabase DB02 -MaxThreads 10

Open in new window

0
 
LVL 10

Accepted Solution

by:
Marshal Hubs earned 1200 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
Ransomware Attacks Keeping You Up at Night?

Will your organization be ransomware's next victim?  The good news is that these attacks are predicable and therefore preventable. Learn more about how you can  stop a ransomware attacks before encryption takes place with our Ransomware Prevention Kit!

 
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

Ransomware Attacks Keeping You Up at Night?

Will your organization be ransomware's next victim?  The good news is that these attacks are predicable and therefore preventable. Learn more about how you can  stop a ransomware attacks before encryption takes place with our Ransomware Prevention Kit!

Question has a verified solution.

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

For anyone that has accidentally used newSID with Server 2008 R2 (like I did) and hasn't been able to get the server running again because you were unlucky (as I was) and had no backups - I was able to get things working by doing a Registry Hive rec…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Suggested Courses
Course of the Month12 days, 4 hours left to enroll

752 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