AD LDAP query (Member of)

D

Dr.Chi

I need to get an LDAP query that will display all the users of a
particular group (Domain Admins to be exact).

I have searched and found several solutions, but most seem to be web
or VB based. I need one that I can use in the "Custom Search"
section of Find in Active Directory Users and Computers. I *have* to
pull it up in that Find listing, an external VB script won't help me.

I do have a search that will pull up disabled users in AD which works
in the Find:
(&(objectcategory=person)(objectclass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))

And I have found similar looking queries with group membership but
they don't seem to work for me.

Help would be appreciated...thanks.

-Chris Shannon MCSE+I
 
T

Tomasz Onyszko

Dr.Chi said:
I need to get an LDAP query that will display all the users of a
particular group (Domain Admins to be exact).

I have searched and found several solutions, but most seem to be web
or VB based. I need one that I can use in the "Custom Search"
section of Find in Active Directory Users and Computers. I *have* to
pull it up in that Find listing, an external VB script won't help me.

I do have a search that will pull up disabled users in AD which works
in the Find:
(&(objectcategory=person)(objectclass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))

And I have found similar looking queries with group membership but
they don't seem to work for me.

Help would be appreciated...thanks.

combine dsquery with dsget

here You ave example of the batch file to list the members of
distribution group:
http://www.jsiinc.com/SUBO/tip7400/rh7451.htm
 
T

Tomasz Onyszko

Dr.Chi said:
I need to get an LDAP query that will display all the users of a
particular group (Domain Admins to be exact).

I have searched and found several solutions, but most seem to be web
or VB based. I need one that I can use in the "Custom Search"
section of Find in Active Directory Users and Computers. I *have* to
pull it up in that Find listing, an external VB script won't help me.

I do have a search that will pull up disabled users in AD which works
in the Find:
(&(objectcategory=person)(objectclass=user)(userAccountControl:1.2.840.113556.1.4.803:=2))

And I have found similar looking queries with group membership but
they don't seem to work for me.

Help would be appreciated...thanks.

combine dsquery with dsget

here You ave example of the batch file to list the members of
distribution group:
http://www.jsiinc.com/SUBO/tip7400/rh7451.htm
 
E

Eric Fleischman [MSFT]

If I can ask what might be a dumb question....if you would like to obtain
all of the members of domain admins, why not query the domain admins group
directly and look at the member attribute?

~Eric
 
T

Tomasz Onyszko

Eric said:
If I can ask what might be a dumb question....if you would like to obtain
all of the members of domain admins, why not query the domain admins group
directly and look at the member attribute?

Yes Eric, you are right :) - but I though about quering group in general
:)) - maybe my answer is a little too broad
 
D

Dr.Chi

How exactly would I go about doing this? Without using a script.

I have tried every query I can google and none of them will simply pop
out a list of members in the "Find" results box.
 
E

Eric Fleischman [MSFT]

Well in your original post you were looking for query syntax. so to answer
in comparable terms, you just want to do a base search against the group and
read the member attribute.
Youc an do this any way you'd like (script/tool/ui/etc).

If that doesn't answer your question, please give me another shot...I'm not
sure I understand what you're looking for.

~Eric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top