The following cmdlet will help to generate a list of recipients ‘not hidden’

get-recipient -resultsize unlimited -filter {HiddenFromAddressListsEnabled -eq $false}

If you want to export the result to a csv file,

get-recipient -resultsize unlimited -filter {HiddenFromAddressListsEnabled -eq $false} | Export-CSV c:recipient.csv

Leave a Reply

Your email address will not be published. Required fields are marked *

Protected by WP Anti Spam