$contacts = import-csv "c:\contacts.csv"
foreach ($c in $contacts)
{
new-mailcontact -name $c.displayName -ExternalEmailAddress $c.targetaddress -org Contacts
set-mailcontact $c.displayName -HiddenFromAddressListsEnabled:$true
add-distributiongroupmember GroupName -member $c.displayName
}
|