Solved

How to move multiple mailbox to different DB simultaneously using Exchange powershell ?

Posted on 2009-04-01
8
2,992 Views
Last Modified: 2012-06-27
I have around 50 mailbox to  move and each one of them goes to different database. I would like to make 5 lists of 10 mailbox and run it from differnt server. Hence I would open 5 powershell window. From each window I would only like to use MAX THREAD 5.
 
If I use the below command it would only allow me to move the list of users one specific DB. As a result I have to keep changing DB name and list of user all the time which I dont want.

Get-Content userlist.txt | Get-Mailbox | Move-Mailbox -TargetDatabase 'EX2K7\First Storage Group\Mailbox Database' -MaxThreads 5

If I use the below  command I don't have to specify users and DB name all the time, but the problem is that I am not able to use 5 thread in one window. It only moves one mailbox after another. So mailbox move would take long time.

Import-CSV move.csv | ForEach {Get-Mailbox $_.alias | Move-Mailbox -TargetDatabase $_.TargetDB -PreserveMailboxSizeLimit:$true -Confirm:$False}

[move.csv contains alias,Database]

The above statement only works for single-threaded move-mailbox. I have even tried even - MAXTHREADS 5 in the above command. It does not work. Only one mailbox moves at one time. Then the next one.

Can anyone please help me by giving me a script or command ? How can I use multi threading  to move mailbox in different DB without changing list of users or input file?

Any kind of help would be highly appreciated.

Thanks in Advance!




0
Comment
Question by:isakabir
[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
  • 2
  • 2
  • 2
  • +1
8 Comments
 
LVL 17

Expert Comment

by:Andres Perales
ID: 24045808
Why don't you use the move mailbox wizard from ESM and schedule those things to move at different times?
http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/moving-mailboxes-exchange-2007-part1.html 
 
0
 

Author Comment

by:isakabir
ID: 24045982
Thanks for  your reply. This does not  help me because I can not schedule move in different time. I need to move all these mailbox within a very short perios of time. That's why I have to utilize multi threading and it will help me to move mailbox simultaneously. Moreover, using move mailbox wizard of colsole (EMC) is not efficient enough  for large amount of mailbox. I need a efficient way to move mailboxe.

 Any more thoughts?

Thanks in advance!
 
0
 
LVL 3

Expert Comment

by:nskurs
ID: 24046072
In this case single command line won't work. We have to write a script with arrays.

I hope the script in this link might help you..
http://blogs.technet.com/benw/archive/2008/06/02/move-mailbox-from-a-csv-import-file.aspx

- Cheers!
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 65

Expert Comment

by:Mestha
ID: 24048862
Your reasons for using a script are incorrect.
The move mailbox wizard in EMC allows you to select multiple mailboxes, it is fully multi threaded and allows you to schedule the move. I have moved 1000s of mailboxes using Move Mailbox. You need to look at the wizard again, as it will do everything that you have asked for.

Simon.
0
 

Author Comment

by:isakabir
ID: 24054362
If I use  EMC I can not choose different destination DB for 100 mailboxes at once. This wizard is  good when I want to move 100 DB to a same destination DB. Correct me if I am wrong. Moreover; use filering to find out which are the alias need to be moved contains lot of manual work.
0
 
LVL 65

Accepted Solution

by:
Mestha earned 250 total points
ID: 24055606
You are saying a script doesn't involve a lot of work?
If you have five sets of mailboxes then you simply run the wizard five times.

I will unsubscribe from this question now as I simply wanted to state that what you had written was incorrect. All the script will do is allow you to select the mailboxes in another way, it does nothing else different to what the wizard does.

Simon.
0
 
LVL 17

Assisted Solution

by:Andres Perales
Andres Perales earned 250 total points
ID: 24056057
That is why I suggested the Mail move wizard originally, as Mestha said, you can run it several different time to move mailboxes.
0

Featured Post

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!

Question has a verified solution.

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

This article explains how to install and use the NTBackup utility that comes with Windows Server.
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
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…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

623 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