Bulk Mailbox Moves Exchange 2010

2017-12-01T13:35:49+00:00 February 2nd, 2010|Exchange|

You may come across an issue where you need to Migrate Multiple Mailboxes in bulk, we’ve created a Exchange Powershell script which will move all users into there targeted mail stores.

Instructions

Before we run this powershell script  we need to create a csv file with the users display name and there targeted exchange database, to do this see below.

1, open notepad.exe

2, now write the following text on your first line in notepad “user,database” (without quotation marks)

3, Go to the next line and then type a users name  first and then add a comma and finally type the desired store.

4, You should end up with a list like below with all the users you want to import

user,Database
Jovan Davis,Store 3
Daniel Davies,Store 2
Hardeep Bains,Store 1

5, Finally save the file as a csv file and name it “MM.csv” in the following directory “C:MailboxMove””

6, Now open notepad again and copy all the below text into it. Finally save this as a PS1 file and run this via the Exchange management Shell.
_________________________________________________________________________

$Userstodatabase = import-csv C:MailboxMoveMM.csv
foreach ($Record in $Userstodatabase)
{
$users = $record.user
$database = $record.database
New-MoveRequest –identity $users –TargetDatabase “$Database”
}

____________________________________________________________________________

This will now move the mailboxes 🙂

If you want to check the status if the moves simply copy the below script into a PS1 file and run it from the exchange shell and it will list the progress of all users mailboxes specified in the CSV.

____________________________________________________________________________

$Userstodatabase = import-csv C:MailboxMoveMM.csv
foreach ($Record in $Userstodatabase)
{
$users = $record.user
Get-MoveRequest –identity $users
}

___________________________________________________________________________ 

Hope this helps 🙂

Daniel Davies