The following command will list all members of my GroupName group
1 |
Get-AdGroupMember -identity GroupName |
We can filter out the results and just get the member name with this command
1 |
Get-AdGroupMember -identity "HR Full" | select name |
The last step is to export the results to a scv file
This is done by adding Export-csv to our above commands. The full command looks like this
1 |
Get-ADGroupMember -identity "GroupName" | select name | Export-csv -path C:\Output\GroupNameMembers.csv -NoTypeInformation |