Hello,
Domain A - Source domain with Exchange Mailboxes and AD account
Domain B - Target domain which will host only mailbox (Linked). AD account will remain in Domain A.
If I have an existing "Mail User" in Domain B with a matching External SMTP address of a user mailbox which is to be moved from Domain A I find that the target address is not set correctly when running the following preparemoverequest.ps1 script.
prepare-moverequest.ps1 -remoteforestdomaincontroller sourcedc.source.local -remoteforestcredential $remotecredentials -localforestdomaincontroller targetdc.target.local -localforestcredential $localcredentials -targetmailuserou "ou=migrated,dc=target,dc=local" -verbose -identity testuser -mailboxdeliverydomain source.ex.local -linkedmailuser -overwritelocalobject -uselocalobject
I specify "-mailboxdeliverydomain" to set the required target address but this is not set and the targetaddress remains the same.
I guess I could workaround this by scripting the change but I wonder why it does not set the target address as I have specified. Note if a Mail User does not already exist the script correctly sets the target address to the domain specified in -mailboxdeliverydomain.
In addition after the mailbox is moved the mailbox is set to a User Mailbox and not linked mailbox. In the preparemoverequest I specify the -linkedmailuser switch and disable the AD account for the mail user in the source domain. This can be fixed after the mailbox move by running the following command but I wonder why this is happening?
set-user -id user1 -linkedmasteraccount source\user1 -linkeddomaincontroller sourcedc.source.local -linkedcredential(get-credential)
Many Thanks
Mark