Unable to move-mailbox cross forest.

Hi,
 I am using the following below, but keep getting an error of:
Move-Mailbox : A parameter cannot be found that matches parameter name '-'.
At line:1 char:13

I believe my credentials are fine as I can issue the command below for both source and target servers.  
Get-Mailbox -DomainController server.domain.com -Credential $S -Identity jsmith

Move-Mailbox -TargetDatabase "mailcluster\First Storage Group\Mailbox Database" -Identity jsmith -GlobalCatalog target.domain.com -SourceForestGlobalCatalog source.domain.com -NTAccountOU "OU=Users,DC=domain,DC=com" -SourceForestCredential $S -TargetForestCredential $t -DomainController source.domain.com -SourceMailboxCleanupOptions none -PreserveMailboxSizeLimit -IgnorePolicyMatch

I’m guessing it cannot read my database on the target server.  I tried using both the mailcluster name and the actually server names.  

Thanks
David
dross333Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
endital1097Connect With a Mentor Commented:
yes, i was confirming your statement
first glance your syntax looks good and I don't see anything that stands out

does the error show the >> before the -TargetDatabase

i would try move-mailbox jsmith -targetdatabase...
0
 
endital1097Commented:
the target database must be in the format exchvirserver\sg\md

0
 
dross333Author Commented:
it Is

here is the path I am using in my original  post.
mailcluster\First Storage Group\Mailbox Database

real servers are exch01 and exch02

0
 
dross333Author Commented:
Thanks Much.  Moving the -identity jsmith to the position right after move-mailbox fixed the issue.

Thanks Again
0
All Courses

From novice to tech pro — start learning today.