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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using LDAP to find users which are users not in group

Status
Not open for further replies.

subby80

IS-IT--Management
Oct 5, 2007
1
NL
Hi,

I've trying to find a query which gives me the result of users which aren't a member of specific group. Can anyone help me. Because it is not working for me by using the standard query editor in Active Directory.
 
Here is the code your looking for:
Code:
(objectCategory=person)(objectClass=user)(!(memberOf=CN=SecurityGroupName,OU=AnOU,DC=domain,DC=com))
Plug in the DN path to the security group in question. The "!" mean Not a member.

Jesse Hamrick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top