Cross forest Move-Mailbox Error
Hello, I am trying to move a mailbox between two forests. I want to merge the content from the source forest mailbox into an existing mailbox in the target forest. I have written a script but I am getting an error indicating that the source mailbox object can not be used by the move-mailbox command. The script and the error are appended. Does anyone have an idea on what I am doing wrong. The procedure is docuemented both at http://technet.microsoft.com/en-us/library/aa997145(EXCHG.80).aspx and http://blogs.technet.com/b/exchange/archive/2006/11/02/3396084.aspx Thanks Bill # Get the credentials that are required for a mailbox move. $sourceForestCredential = Get-Credential $targetForestCredential = Get-Credential #Get the source and target domain Controllers for LDAP and GC operations $sourceDomainController = "dc1.sourcedomain.com" $targetDomainController = "dc1.targetdomain.com" #Get the source and target mailbox names $sourceMailboxName = "bill-test" $targetMailboxName = "bill-test" #Get the source mailbox $sourceMailbox = get-mailbox -identity $sourceMailboxName -DomainController $sourceDomainController -Credential $sourceForestCredential #Get the targetmailbox and its parameters. $targetMailbox = get-mailbox -identity $targetMailboxName -DomainController $targetDomainController -Credential $targetForestCredential $targetMailboxDatabase = $targetMailbox.Database $targetMailboxIdentity = $targetMailbox.Identity $sourceMailbox | move-mailbo Move-Mailbox : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not m atch any of the parameters that take pipeline input. At C:\Users\me\Documents\crossForestMove.ps1:26 char:30 + $sourceMailbox | move-mailbox <<<< -TargetDatabase $targetMailboxDatabase -Identity $t argetMailboxIdentity -SourceForestGlobalCatalog $sourceDomainController -GlobalCatalog $t argetDomainController -DomainController $targetDomainController -AllowMerge -RetryInterva l 5 -RetryTimeout 90 -SourceForestCredential $sourceForestCredential -TargetForestCredent ial $targetForestCredential + CategoryInfo : InvalidArgument: (William T. Holmes:PSObject) [Move-Mailbo x], ParameterBindingException + FullyQualifiedErrorId : InputObjectNotBound,Microsoft.Exchange.Management.Recipien tTasks.MoveMailbox
May 25th, 2011 4:19pm

hello Bill, Well, I am not too much perfect to judge your script, however here's my article which might help you to do the required withour script only with help of power shell command lines. http://messagingadmin.wordpres s.com/2011/05/03/cross-forest-mailbox-migration-exchange-2007-to-exchange-2007/ Thanks !
Free Windows Admin Tool Kit Click here and download it now
May 25th, 2011 7:43pm

Hi Bill, Move-Mailbox : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input. From this distribution, we know this may issue that Move-Mailbox cannot get any parameters from the pipeline or the input doesn’t match the properties in command Move-Mailbox. The Parameters for targetmailbox ($targetMailbox, targetMailboxDatabase, $targetMailboxIdentity)should not be used before you move the mailbox to the target server, because before you move mailbox to the target server, this command for targetmailbox will return null. Thanks, Evan Liu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 26th, 2011 2:36am

Hello, The target mailbox does exist. I want to merge the source and target mailboxes across the Forests. Bill
Free Windows Admin Tool Kit Click here and download it now
May 26th, 2011 7:19am

Hi Bill, For this issue, I suggest you use this command to have a try: move-mailbox -TargetDatabase $targetMailboxDatabase -Identity $targetMailboxIdentity -SourceForestGlobalCatalog $sourceDomainController -GlobalCatalog $targetDomainController -DomainController $targetDomainController -AllowMerge -RetryInterval 5 -RetryTimeout 90 -SourceForestCredential $sourceForestCredential -TargetForestCredential $targetForestCredential Run the command without ($sourceMailbox) and check the issue. Thanks, Evan Liu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 27th, 2011 8:19am

Hi Bill, Please refer to the command in this document Exchange 2007 Cross Org Mailbox Migration. get-mailbox -DomainController 'forestAdc1.extest.com' -Credential $s -database 'Server1\DatabaseA' | move-mailbox -TargetDatabase 'Server2\Database1' -Identity 'testMailbox1' -SourceForestGlobalCatalog 'forestA.extest.com' -GlobalCatalog 'forestB.extest.com' -DomainController 'forestBdc1.extest.com' -AllowMerge -StartDate '01/10/06' -EndDate '01/11/06' -SubjectKeywords "Exchange" -RetryInterval 5 -RetryTimeout 90 -SourceForestCredential $s -TargetForestCredential $t but in your command $sourceMailbox is: $sourceMailbox = get-mailbox -identity $sourceMailboxName -DomainController $sourceDomainController -Credential $sourceForestCredentiald So I suggest you use this command to do a test: Get-mailbox –DomainController $sourceDomainController –Credential $sourceForestCredential –database $sourceMailbox.Database | move-mailbox -TargetDatabase $targetMailboxDatabase -Identity $targetMailboxIdentity -SourceForestGlobalCatalog $sourceDomainController -GlobalCatalog $targetDomainController -DomainController $targetDomainController -AllowMerge -RetryInterval 5 -RetryTimeout 90 -SourceForestCredential $sourceForestCredential -TargetForestCredential $targetForestCredential I will try to test your script in my lab, and paste the result. Thanks, Evan Liu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
May 27th, 2011 3:17pm

Hi Bill, Please refer to the command in this document Exchange 2007 Cross Org Mailbox Migration. get-mailbox -DomainController 'forestAdc1.extest.com' -Credential $s -database 'Server1\DatabaseA' | move-mailbox -TargetDatabase 'Server2\Database1' -Identity 'testMailbox1' -SourceForestGlobalCatalog 'forestA.extest.com' -GlobalCatalog 'forestB.extest.com' -DomainController 'forestBdc1.extest.com' -AllowMerge -StartDate '01/10/06' -EndDate '01/11/06' -SubjectKeywords "Exchange" -RetryInterval 5 -RetryTimeout 90 -SourceForestCredential $s -TargetForestCredential $t I will try to test your script in my lab, and paste the result. Thanks, Evan Liu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 27th, 2011 3:17pm

Hi Bill, Sorry for late update. I test your script in my lab ( Exchange 2007 SP3 and Exchange 2007 SP2) and find the problem: When you move the mailbox, you can use this command to achieve the goal (I had tested in my lab): move-mailbox -TargetDatabase $targetMailboxDatabase -Identity $sourceMailbox.identity -SourceForestGlobalCatalog $sourceDomainController -GlobalCatalog $targetDomainController -DomainController $targetDomainController -AllowMerge -RetryInterval 5 -RetryTimeout 90 -SourceForestCredential $sourceForestCredential -TargetForestCredential $targetForestCredential Note: Please remember to follow that document to check on your source server and target server (before move the mailboxes). If anything is unclear, please feel free to let me know. Thanks, Evan Liu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2011 4:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics