Print a list of group members in Domain
Can anyone give the the correct syntax (if it exists) to use the DSQUERY
command line tool to query the members of a specific group in AD? I have
tried many combonations and I cant seem to figure it out. I tried:
dsquery user OU=xxx, DC=yyy,DC=ZZZ
but I don't know what should go after that. I also tried the dsquery group
method with no luck. Does anyone know the correct way??
Thanks!
Sol :
C:\>dsget group "CN=GroupName,DC=domain-name,DC=com" -members
If you need to specify a server and/ or credentials, append the following on
the end:
-s dc01 -u userName -p *
command line tool to query the members of a specific group in AD? I have
tried many combonations and I cant seem to figure it out. I tried:
dsquery user OU=xxx, DC=yyy,DC=ZZZ
but I don't know what should go after that. I also tried the dsquery group
method with no luck. Does anyone know the correct way??
Thanks!
Sol :
C:\>dsget group "CN=GroupName,DC=domain-name,DC=com" -members
If you need to specify a server and/ or credentials, append the following on
the end:
-s dc01 -u userName -p *
Comments
Post a Comment