Need script to set members in AD group as hidden from Address list.The attribute msExchHideFromAddresslists needs to be enabled for all users in a particular AD group
The below script does not seem to work where i exported all members to CSV called contacts.csv :
Import-Csv "C:\contacts.csv" | Foreach {get-mailcontact -identity $_.Contacts -Hiddenfromaddresslistenabled
$true}