Migrating mailboxes from Exchange 2000/2003 To Exchange 2007 in a different forest.
This of course all takes place in the new Exchange Management shell which so far seems like a huge step backward in technology.
This wasnt easy to figure out. Hope this info helps, it is without warranty or gaurantee and I suppose you could completely delete the entire world if you follow them (limiting my liability if you screw up). This process gets a list of mailboxes and supplies them to the move-mailbox command so you dont have to enter them one at a time.
First credentials need to be set in the source domain (the Ex2000/2003 domain)
The command below will pop up a gui to enter domain\usernam and password and stores these in the variable $c which will be called later.
$c = Get-Credential
Getting the mailbox list
Default Get-Mailbox command - there are many more options for this but here is what I used.
Get-Mailbox -Credential $c -Database "Exch2003Server1\DB1" -DomainController server.domain.com -ResultSize Unlimited
-Database is your old EX2000 or Ex2003 server and must be "servername\Mailbox Store" The "Mailbox Store" must be the exact name as it appears in ESM under the First Storage Group.
-DomainController specifies a DC in the source or old EX2000/2003 domain.
-TargetDatabase is your new Ex2007 server and must be "servername\Mailbox Database" The "Mailbox Database" is the default name and should work unless it was changed.
-ResultSize Unlimited tells the Get-Mailbox command to list all the mailboxes in your org, unfiltered.
Run the Get-Credential and Get-Mailbox commands above (customized for your setup) to confirm that it works before proceeding.
save your working Get-Mailbox command.
Next a Move-Mailbox command must be built.
The default command looks like:
Move-Mailbox -TargetDatabase "Ex2007servername\Mailbox Database" -SourceForestGlobalCatalog server.domain.com -SourceForestCredential $c
-TargetDatabase is the Exchange server you are moving to.
-SourceForestGlobalCatalog is a 2003 Global Catalog server FQDN. !!YES IT MUST BE 2003!! I had to install one in my 2000 domain to get this to work but first had to deall with forestprep and domainprep issues.
-SourceForestCredential is another call to your $c variable which is your EX2000/2003 domain admin account.
Now the Get-Mailbox command needs to be piped into the Move-Mailbox command and, Presto! Mailboxes migrate.
Get-Mailbox -Credential $c -Database "Exch2003Server1\DB1" -DomainController server.domain.com -ResultSize Unlimited | Move-Mailbox -TargetDatabase "Ex2007servername\Mailbox Database" -SourceForestGlobalCatalog server.domain.com -SourceForestCredential $c