Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-01
8
Medium Priority
?
3,158 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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 1000 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

670 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