Hi, l am trying to remove additional SMTP addresses in bulk from Mail contacts in 2010 with the script below.
$list = import-csv d:\support\contacts.csvforeach($Contact in $list)
{
$Contact.EmailAddresses |
?{$_.AddressString -like "@DOMAINNAME"} | %{
Set-MailContact $Contact -EmailAddresses @{remove=$_}
}
}
Contents of the contacts.CSV: has a header of Contact and list of External Email Addresses.