Solved

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

Posted on 2009-04-01
8
2,637 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
  • 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

Why spend so long doing email signature updates?

Do you spend loads of your time carrying out email signature updates? Not very interesting are they? Don’t let signature updates get you down. Let Exclaimer Cloud - Signatures for Office 365 make managing email signatures a breeze.

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
To show how to create a transport rule 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 >> Rules tab.:  To cr…
how to add IIS SMTP to handle application/Scanner relays into office 365.

747 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

15 Experts available now in Live!

Get 1:1 Help Now