After performing a Cross Org mailbox migration, administrators need to enable mail redirection from the source to the target forest. Even though GALSync remains the recommended tool for this purpose, the initial synchronization process can take some time which means that messages queued during the move and messages sent from users in the source forest before the contacts objects were created will NDR.
To address this issue, Exchange 2007 added to Move-mailbox a parameter called SourceMailboxCleanupOptions to determine what "source cleanup" will be done after the move.
For RTM, this parameter accepts 2 options:
These two options don't address completely the issue but allow easier scripting than we had in the Exchange 2003 days. To fully support our additional cleanup needs we have added 2 new options for this parameter in SP1:
Workaround for Exchange 2007 RTM: A cross org migration cleanup script
As I mentioned above, our RTM version has an improved but incomplete "cleanup" functionality. To help our customers to perform these cleanup options before Service Pack 1 is released, I have created a PowerShell script that provides similar functionality: It creates a mail enabled contact (when the option to delete the source user is used) or it can mail enable the user account (when the option to delete the source mailbox attributes is used).
It is worth noticing that this script has some limitations when compared to our SP1 move-mailbox task:
Here is an overview of the steps performed by the script:
Here is an example of a mailbox migration using the script:
Step 1 – Create variables that hold credentials for source and target Forests
$source = get-credential
$target = get-credential
Step 2 – Create a csv file that contains information about the mailboxes you want to migrate (for example, mailboxes that have contain Paul in identity)
get-mailbox Paul* | export-csv C:\users.csv
Step 3 – Call script passing all necessary information:
C:\migrationCleanup>.\migrationCleanup.ps1 -SourceGlobalCatalog sourceServer.SourceDomain.com -SourceDomainController sourceServer.SourceDomain.com -DomainController targetServer.TargetDomain.com -GlobalCatalog targetServer.TargetDomain.com -NTAccountOU 'CN=Users,DC= TargetDomain ,DC=com' -ContactsOU "Users" -UsersFile "C:\users.csv" -TargetDatabase " targetServer \Mailbox Database" -SourceMailboxCleanupOptions DeleteSourceMailbox -SourceForestCredential $source -TargetForestCredential $target -TargetSMTPDomain "TargetDomain.com"
In this example, I had the following server configuration:
-SourceGlobalCatalog
|
sourceServer.SourceDomain.com
|
-SourceDomainController
|
sourceServer.SourceDomain.com
|
-DomainController
|
targetServer.TargetDomain.com
|
-GlobalCatalog
|
targetServer.TargetDomain.com
|
-NTAccountOU
|
'CN=Users,DC=FRICIB-dom,DC=extest,DC=microsoft,DC=com'
|
-ContactsOU
|
"Users"
|
-UsersFile
|
"C:\users.csv"
|
-TargetDatabase
|
" targetServer\Mailbox Database"
|
-SourceMailboxCleanupOptions
|
DeleteSourceMailbox
|
-SourceForestCredential
|
$source
|
-TargetForestCredential
|
$target
|
-TargetSMTPDomain
|
"TargetDomain.com"
|
Most parameters work the same way they do in move-mailbox. The exceptions are –ContactsOU, which determines where your source contact will be created and the parameter –TargetSMTPDomain, which is used when moving mailboxes to legacy Exchange servers. In these cases, the target SMTP address is stamped in the target mailbox by the RUS, which means it might not be present right away. Since we need that target address to be used as the –ExternalEmailAddress of the newly created source mail contact or mail enabled user, we will use the –TargetSMTPDomain parameter along with the alias of the source mailbox as a substitute for it.
Besides the limitations mentioned earlier (and all the optimizations I know you will come up with), this script should work just fine and allow you to avoid the large majority of NDRs for email sent during and after a Cross Org mailbox move.
You can get the migration cleanup script as an attachment to this blog post.
- Paul MacKnight
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.