Location: List Archives

List Archives

This forum is an archive of all posts to our mailing list over the past few years.  The forum is set read only therefore to contribute you will need to join our list community.  See more info about this here.

 

When subscribed to the list you should use your standard email client to send your posts to ActiveDir@mail.activedir.org.

List Archives

Subject: RE: [ActiveDir] How to construct LDAP filter in ADFIND to exclude just one OU?
Prev Next
You are not authorized to post a reply.

AuthorMessages
bdesmondUser is Offline

Posts:977

08/23/2010 5:29 PM  
You've got the how in the thread already. The why is that it's technically not possible to filter on the DN like this.

For future reference, if you wanted to find users who weren't contractors, you might do this:

(&(objectCategory=person)(objectClass=user)(!(employeeType=CONTRACTOR)))

Thanks,
Brian Desmond
brian@briandesmond.com

c   - 312.731.3132

-----Original Message-----
From: activedir-owner@mail.activedir.org [mailto:activedir-owner@mail.activedir.org] On Behalf Of Mike Leone
Sent: Monday, August 23, 2010 9:53 AM
To: Active Dir ML
Subject: [ActiveDir] How to construct LDAP filter in ADFIND to exclude just one OU?

I've been reading the ADFIND docs and examples, but am still unclear on how to accomplish what I need. I need all computer accounts *except* those in one specific OU. And I can't seem to figure out how to construct a filter that says (in effect) "(object category=computer) AND (OU!=Servers").

I see the "Multivalue NOT filter"; is that what I need? It's unclear to me if that's what I need, to specify a NOT EQUAL TO condition for a filter.

Does anyone have an example of a NOT filter that they can smack me over the head with? :-) Preferably one that excludes an OU ...

Thanks



You are not authorized to post a reply.
Forums >ActiveDir Mail List Archive >List Archives > RE: [ActiveDir] How to construct LDAP filter in ADFIND to exclude just one OU?



ActiveForums 3.7
Friends

Friends

VisualClickButoton
Members

Members

MembershipMembership:
Latest New UserLatest:MrPTSai
New TodayNew Today:0
New YesterdayNew Yesterday:0
User CountOverall:5234

People OnlinePeople Online:
VisitorsVisitors:38
MembersMembers:0
TotalTotal:38

Online NowOnline Now:

Ads

Copyright 2009 ActiveDir.org
Terms Of Use