The following script can be used to update Linked Mailbox (mxExchMasterAccountSID) value.
Script
$SCDCred=get-credential
Import-CSV "D:\Scripts\inputCM.csv" | foreach {
$TsAMAccountName = "SIVADOM\" + $_.sAMAccountName
write-host Updating $_.sAMAccountName
Set-mailbox $_.PEmail -EmailAddressPolicyEnabled $false
set-mailbox $_.PEmail -LinkedMasterAccount $TsAMAccountName -LinkedDomainController houdc01.sivarajan.com -LinkedCredential $SCDCred
}
1 comments:
Such a useful content for me! I am really happy to find it!
Post a Comment