Solved

Move over 1000 mailboxes to a different storage groups powershell script

Posted on 2010-09-03
6
860 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:Tacobell2000
6 Comments
 
LVL 12

Expert Comment

by:FDiskWizard
ID: 33598905
have you tested any moves manually? That's a lot of mailboxes. Are they very big?
Look at this:
http://www.exchangeninjas.com/MoveMBsToTargetMD
0
 
LVL 32

Expert Comment

by:endital1097
ID: 33598937
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 }
0
 
LVL 20

Expert Comment

by:SatyaPathak
ID: 33599224
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Tacobell2000
ID: 33601117
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
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 total points
ID: 33601241
i would just run

Get-Content c:\aliases.txt | Move-Mailbox -TargetDatabase "server\SG1\Mailbox Database" -MaxThreads 10

can you post the error from the shell
0
 

Author Comment

by:Tacobell2000
ID: 33601638
it is working now!!!

thank you Endital!!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
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
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

760 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

17 Experts available now in Live!

Get 1:1 Help Now