Link to home
Start Free TrialLog in
Avatar of Tacobell2000
Tacobell2000Flag for Canada

asked on

Move over 1000 mailboxes to a different storage groups powershell script

Hello,

I have to move over 1000 mailboxes this weekend into different storage groups. I have a txt file with all the aliases. I would like to use this txt file and schedule the move. Is there a powershell script that will allow me to move 10 mailboxes at a time?

Tacobell2000
Avatar of FDiskWizard
FDiskWizard
Flag of United States of America image

have you tested any moves manually? That's a lot of mailboxes. Are they very big?
Look at this:
http://www.exchangeninjas.com/MoveMBsToTargetMD
take your text file and put it into one column in excel
add column header for alias and database
then put the name of your mailbox databases next to the user in the database column
save it as a csv file so it looks like the following

"alias",database"
"test","mail\sg1\mdb1"

then you could run the following
import-csv c:\mbxs.csv | foreach-object { Move-Mailbox $_.alias -TargetDatabase $_.database }
Avatar of Tacobell2000

ASKER

this is what I'm doing...

$users = get-content Aliases.txt
$users | move-mailbox -TargetDatabase "server\SG1\Mailbox Database" -MaxThreads 10




and this is what i get:

Move-Mailbox : The input object cannot be bound to any parameters for the comma
nd either because the command does not take pipeline input or the input and its
 properties do not match any of the parameters that take pipeline input.
At line:1 char:22


Powershell freezes up and nothing happens......then i must move the mailbox using move-mailbox command

any ideas?

Tacobell2000
ASKER CERTIFIED SOLUTION
Avatar of endital1097
endital1097
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
it is working now!!!

thank you Endital!!