Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LDAP User Group Query

Status
Not open for further replies.

jeremy750

IS-IT--Management
May 22, 2002
22
0
0
US
Simple task...query AD for a list of users in a specific group that I can then export to a .csv file to be imported into excel. I know AD can do this because I query it all the time to do this.

My problem is that i have created a query in many different ways to look for users in a specific group and enumerate them. Everytime I run the query the results return nothing.

My group is located in an OU within the entire AD structure.

Here are some examples of queries I have tried that result in nothing (there are about 5500 users in the group when I click on the tab that lists its members)I'll start with the ones that are built in to choose from in AD users & computers:

Custom Query built-in field queries:
(&(objectCategory=user)(memberOf=mycompany-Users))
That returns nothing

(&(objectCategory=group)(member=mycompany-Users))
That returns nothing

Users,contacts,groups:
(&(&(|(&(objectCategory=person)(objectSid=*)(!samAccountType:1.2.840.113556.1.4.804:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=14)))(objectCategory=user)(memberOf=mycompany-Users)))
Returns nothing

(&(&(|(&(objectCategory=person)(objectSid=*)(!samAccountType:1.2.840.113556.1.4.804:=3))(&(objectCategory=person)(!objectSid=*))(&(objectCategory=group)(groupType:1.2.840.113556.1.4.804:=14)))(objectCategory=group)(member=mycompany-Users)))
Returns nothing



I have tried a bunch of changes to the (memberOf=) as well adding CN=mycompany-Users,DN= etc...


Any help? I may just be a moron that is not interpreting the query properly (I fear is true) but I don't do this often so no ego lost.

Thanks!

-J


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top