EmailAddresspolicy When migrating users from Exchagne 2003 to Exchagne 2007

If you are migration from Exchagne 200x to Exchagne 2007 if you have Email policy with mulitple domains listed in the Exchange address tab and if you Primary smtp is not same as the DefaultEmail policy then once the mailbox is moved then you primary smtp address will get changed to email address which is set throught Defaultemail policy. The simple solution is you need to make sure that -EmailAddresspolicy should be disabled before you move the mailbox. This solves the problem.

$UserList = Get-Content “PathofTextfilecontactingusernames”
foreach($user in $UserList)
{
set-Mailbox $user -EmailAddressPolicyEnabled $false

}

Powershell to Move Multiple Mailboxes in Multithread

This is a Beautiful piece of code which helps in moving the Multiple mailboxes in Multithread.

Sourcefilepath contact the text file with the list of alias names or email address of the users to move.
TargetDatabase should have the path of the destination store where mailstore to be moved.
Maxthreads 8 will move 8 users at a time, you can increase this count based on the performace of your machine.
-BadItemsLimit is if mailbox which is moved has some corrupted item then move-mailbox wil skip the corruption upto 30 items. If this corsses then specific mailbox will not be moved, but it will continue to move rest of the mailbox.

$TargetDatabase = “Path to the destination Store”
$k = Get-Content “SourceFilepath”
$k| Get-Mailbox | Move-Mailbox -BadItemLimit ’30’ -TargetDatabase $TargetDatabase -maxthreads 8 -Confirm: $false