extracting the list of Users in a group using dscl
I am trying to extract a list if the users inside an AD group using the dscl command in OS X terminal.
So far i can get to the groups using the command:
Now i hit the problem. If i try to list the Staff\ Group and then read the PrimaryGroupID and use $1,$2 > filename.txt, it doesn't read any data or it throws an error.
dscl /Active\ Directory/All\ Domains/Groups/
How can i get to the group Staff\ Group to read the attributes and extract the list of users in the group?
Thanks for your help.