I'm trying in powershell to output all AD users from a certain group with no data in the email address field.
I have the following command:
get-aduser -filter * -properties * | where {!$_.emailaddress} | select-object samaccountname | export-csv c:\email\noemailusers.csv
But I'm trying to narrow down the results to only users who are member of a certain group.
Any help is much appreciated!