Solved

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

Posted on 2009-04-01
8
2,770 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video discusses moving either the default database or any database to a new volume.

856 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