Pages

Saturday, September 17, 2016

Cross-forest Maibox move Migration commands


$User = "test.loc\vijaya.reddy"
$PWord = ConvertTo-SecureString –String "SourcePWD" –AsPlainText -Force

$SourceCredential = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord

$User = "targettest.local\vijaya.reddy"
$PWord = ConvertTo-SecureString –String "TargetPWD" –AsPlainText -Force


$TargetCredentials = New-Object –TypeName System.Management.Automation.PSCredential –ArgumentList $User, $PWord

Import-csv "C:\temp\moveusers.csv" | Foreach-Object { Move-Mailbox -TargetDatabase "exchange\First Storage Group\Mailbox Database" -Identity $_.Identity -GlobalCatalog testdc03.test.local -SourceForestGlobalCatalog testdc02.test1.loc -NTAccountOU "OU=test Users,DC=test,DC=local" -SourceForestCredential $SourceCredential -TargetForestCredential $TargetCredential -IgnorePolicyMatch:$true -BadItemLimit 1000 -maxthreads 50 -verbose -Confirm: $false}

No comments: