I found this single command line gets the members of a group with their display name and user name.
dsquery group -name "My AD Group Name" | dsget group -members | dsget user -display –samid
Check DSGet User /? to get more information about the users.
Check DSGet Group /? to get more information about the groups.
4 thoughts on “Get Active Directory Group member list”
Hi Anand, Its been a long time….How are you.Well iam badly and urgently in need of a script.The question is :-
I want a script which gives active enabled users information from Active directory.I want the information as below mentioned fields:-
Region and Site
I want the output in a excel sheet and mainly i will be running the script remotely.
Please help me…If you can give me the script with above mentioned details,i will be very very great full to you.Iam eagerly waiting you to help me out in this issue.
Also you can reach me at email@example.com
dsget group “CN=” -members -expand
dsget group “cn= your Group name ” -members -expand