$ConfirmPreference =
"None"
$contacts =
Import-csv 'H:\FILENAME.csv'
Foreach($contact
in $contacts)
{
if($contact.CurrectExternalAddress.Length
-gt 0)
{
Set-MailContact -Identity
$contact.CurrectExternalAddress
-ExternalEmailAddress $contact.NewExternalAddress -Confirm:$false -ForceUpgrade
}
}
But I just could not get it working automatically, it kept prompting to me to upgrade each contact to 2010. Which is fine, but it was making me press Enter for each change. I looked over it and I tried to do "ConfirmPreference" and "-Confirm:$true/$false" without much success. It wasn't until I read somewhere to try "-Force" that I found the "-ForceUpgrade" which allowed the upgrade to happen without a prompt.
I honestly had never seen that parameter before. Maybe this will be useful to one of you, and might save you some time.
No comments:
Post a Comment