If you need to move mailboxes over from one domain into another.  Here’s a script on how to do it.
1. Start the Microsoft Exchange Shell
2. Type in the following commands to set the source and target credentials.
$SourceCredential = Get-Credential
$TargetCredential = Get-Credential
3. Type in the following command to move the mailbox.
Move-Mailbox -TargetDatabase “MBX\First Storage Group\Mailbox Database” [...]