Hello Friends, this article will show you how to use powershell command to list group members. After running this command all Active Directory Group members will be saved to csv file which can be used further purposes.
How To Export AD Group Members
Get-ADGroupMember -identity Name_of_Group | select name | Export-csv -path C:\Groups\GroupName.csv -NoTypeInformation
Once this command run successfully then you can see all member names inside exported file.
Now, suppose there are multiple groups inside single group i.e. nested groups and you have to export all members of this group. So above command will not work in this case. Because it will not go in nested groups. So to get that sort of result you need to one parameter i.e. -recursive. What it does exactly ? It add nested group’s members in the list. It will be like below one.
Get-ADGroupMember -identity Name_of_Group -recursive | select name | Export-csv -path C:\Groups\GroupName.csv -NoTypeInformation
- The system writer is not found in the backup
- Few Useful Commands
- GPO To Control Login To Windows 10 With PIN
- Turn Off Picture Password
- Power Management Through Group Policy