Tacobell2000
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
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
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 }
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 }
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
$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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it is working now!!!
thank you Endital!!
thank you Endital!!
Look at this:
http://www.exchangeninjas.com/MoveMBsToTargetMD