locked
Need script to set members in AD group as hidden from Address list RRS feed

  • Question

  • 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}


    • Edited by ajayushus Monday, July 3, 2017 9:30 AM
    Monday, July 3, 2017 8:42 AM

All replies

  • Start with the correct AD CmdLets.

    Help Set-AdUser -full
    help Get-AdGroupMember -full


    \_(ツ)_/

    Monday, July 3, 2017 11:20 AM