• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 528
  • Last Modified:

Via Ldap how can i retrieve all group members?

Hi,

Via Ldap how can i retrieve all group members?
So can use as a query in AD.
Thanks
0
bsharath
Asked:
bsharath
  • 4
  • 4
  • 3
2 Solutions
 
Mike KlineCommented:
You can use this in ADUC


 (&(objectcategory=person)(objectClass=user)(memberOf=DN of your group))

Thanks


Mike
0
 
bsharathAuthor Commented:
Thanks
But does not work

(&(&(objectcategory=person)(objectClass=user)(memberOf=IUK)))

IUK is the group name
0
 
RobSampsonCommented:
When people refer to a DN, or distringuishedName, in Active Directory, it is the fully qualified name structure, as in
memberOf=CN=IUK,OU=SecondOU,OU=FirstOU,DC=domain,DC=com

Rob.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
bsharathAuthor Commented:
Thanks Rob it does work
Can we just give the group name rather than whole
0
 
Mike KlineCommented:
not via an ldap query using memberof, you need then entire DN

thanks

Mike
0
 
bsharathAuthor Commented:
Any other ways?
0
 
RobSampsonCommented:
The only other way is via a script, or the command line tools, I think something like
dsquery group domainroot -name iuk* | dsget group -members

Rob.
0
 
RobSampsonCommented:
If you get
dsget failed:`Target object for this command' is missing.

that means that the dsquery did not find a group name matching your string value.

Rob.
0
 
Mike KlineCommented:
are you just trying to run queries against AD?   Can you use third party (free) tools also?
0
 
bsharathAuthor Commented:
I want it via the AD queries
0
 
RobSampsonCommented:
You can't do wildcards in ADUC with MemberOf. You have to use the dsquery and dsget tools for the simplest method, or write a script to prompt from the group name.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now