John Yassa's Blog

Home » 2013 » January » 21

Daily Archives: January 21, 2013

Moving bulk mailboxes

How to move bulk mailboxes from one database to another one

There are more than one way to move mailboxes to another database:

1- Move all mailboxes in one database to another database, then you can use the command below, this will move all mailboxes from DB “Source mailbox DB” to “Destination Mailbox DB”

Get-Mailbox –Database ‘Source Mailbox DB’ | New-MoveRequest –TargetDatabase `  ‘Destination Mailbox DB’

2- Move few mailboxes, you can use the below command
$Mailboxes is an array containing the names of three mailbox
Each mailbox is passed into the New-MoveRequest cmdlet for processing not concerning the source mailbox DB

$Mailboxes = ‘john’,’nassan’,’yassa’

ForEach ($SingleMailbox in $Mailboxes) {New-MoveRequest –Identity $SingleMailbox ` –TargetDatabase ‘Destination Mailbox DB’ –BatchName Batch01}

3- Using CSV file, like the below where ID is the column header and use the below command

Import-CSV ./mailboxes.csv | foreach {New-MoveRequest -Identity $_.ID – TargetDatabase “Destination Mailbox DB“}

This will work regardless the source Mailbox DB


%d bloggers like this: