|
| |||||||||
| Tags: active directory, display, domain, dsquery, dsquery user |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| DSQuery Help!
This is my syntax. I'm trying to read all members of a group. dsquery * dc=mydomain,dc=lab -filter "(&(objectCategory=group)(name=myGroup))" -attr displayName member With this I have managed to read the groups but it brings the results out in its fully distinguished Name. Is there a way I can probably just get the name to display similar to if I had done for example dsquery user -name Nik* -o rdn |
|
#2
| |||
| |||
| Re: DSQuery Help!
Sorry about that dsquery * dc=mydomain,dc=lab -filter (&(objectCategory=group)(name=*))" -attr displayName member I wish for the members display name to show just as the groups display names are show instead of the DN |
|
#3
| |||
| |||
| RE: DSQuery Help!
Here is how I do it. My group name is engineering. dsquery group -name engineering|dsget group -members|dsget user -samid -fn -ln |
|
#4
| |||
| |||
| RE: DSQuery Help!
The objectClass group stores membership under a mutli-value attribute called member, which is stored as the distinguished name of the user account or group. A query of all available attributes shows that the sAMAccountName or display name is not being stored as an attribute within the group objectClass. So there would not be a single query filter that could be issued against the group objectClass to get this information. dsquery * dc=mydomain,dc=lab -filter "(&(objectCategory=group)(name=Domain Admins))" -attr * tkutil's way is a good method of getting the information though! |
|
#5
| |||
| |||
| Re: DSQuery Help!
Eric: thanks for clearing the air on that one at least I have a better understanding of the query now. Tkutil: I have used your method before to get the information when I explicitly specify the group name |
|
#6
| |||
| |||
| Re: DSQuery Help!
try it the other way round dsquery * -filter "(&(objectcategory=user)(memberof=""<thedistinguishednameofyourgroup>""))" -attr samaccountname display...etc... other attributes u might want to know about your users.... |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "DSQuery Help!" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dsquery | klatif | Active Directory | 1 | 06-10-2011 01:00 PM |
| using Dsquery and DSGET | etechelp | Active Directory | 1 | 21-07-2011 12:32 AM |
| dsquery | Matt | Active Directory | 7 | 18-11-2009 02:21 AM |
| Dsquery | Dylan | Active Directory | 2 | 06-05-2009 09:17 PM |
| DSQUERY | =?Utf-8?B?eWJtY3NlQG5ld3MucG9zdGFsaWFz?= | Active Directory | 4 | 26-01-2005 06:57 AM |