Asked By Bharat Suneja [MVP]
28-Jun-07 09:08 PM
CSV (MoveMailboxes.csv) fields:
Username, TargetDatabase, TargetOU
(You can leave out the TargetDatabase and TargetOU if all moved mailboxes
will be in the same OU and on the same target Store... and use those
references in the command instead of having them in the CSV).
$SourceCredential = Read-Host "Enter Source Forest
Credentials" -AsSecureString
$TargetCredential = Read-Host "Enter Target Forest
Credentials" -AsSecureString
Import-CSV MoveMailboxes.csv | foreach {Move-Mailbox -Identity
$_.Username -TargetDatabase $_.TargetDatabase -NTAccountOU
_.TargetOU -SourceForestGlobalCatalog "mctdc1.test.net" -GlobalCatalog
$SourceCredential -TargetForestCredential $TargetCredential}
--
Bharat Suneja
MVP - Exchange
www.zenprise.com
NEW blog location:
exchangepedia.com/blog
------------------------------