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!

Exclude OU from a Query

Status
Not open for further replies.

cchipman

IS-IT--Management
Sep 16, 2002
125
US
I'm trying to setup a query to get all of the users with an e-mail addres from all of my OU's and containers EXCEPT for one of them...the Irregulars OU.

my filter is formed thusly:

(&(mail=*)(objectClass=person)(!(distinguishedName=*Irregulars*)))

but is not working. How should I be doing it?

TIA,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top