?
Solved

Via Ldap how can i retrieve all group members?

Posted on 2011-09-15
11
Medium Priority
?
519 Views
Last Modified: 2012-05-12
Hi,

Via Ldap how can i retrieve all group members?
So can use as a query in AD.
Thanks
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 3
11 Comments
 
LVL 57

Accepted Solution

by:
Mike Kline earned 1000 total points
ID: 36541725
You can use this in ADUC


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

Thanks


Mike
0
 
LVL 11

Author Comment

by:bsharath
ID: 36541738
Thanks
But does not work

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

IUK is the group name
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547100
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Author Comment

by:bsharath
ID: 36547331
Thanks Rob it does work
Can we just give the group name rather than whole
0
 
LVL 57

Expert Comment

by:Mike Kline
ID: 36547357
not via an ldap query using memberof, you need then entire DN

thanks

Mike
0
 
LVL 11

Author Comment

by:bsharath
ID: 36547382
Any other ways?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547392
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
 
LVL 65

Expert Comment

by:RobSampson
ID: 36547401
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
 
LVL 57

Expert Comment

by:Mike Kline
ID: 36547494
are you just trying to run queries against AD?   Can you use third party (free) tools also?
0
 
LVL 11

Author Comment

by:bsharath
ID: 36547507
I want it via the AD queries
0
 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 1000 total points
ID: 36547525
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

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
A hard and fast method for reducing Active Directory Administrators members.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question