get-mailcontact -OrganizationalUnit "contoso.com/path/to/ou" | Set-mailContact -HiddenFromAddressListsEnabled $true -whatif
Hide all contacts in one OU from addresslist
Leave a reply
get-mailcontact -OrganizationalUnit "contoso.com/path/to/ou" | Set-mailContact -HiddenFromAddressListsEnabled $true -whatif