Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

LDAP Query - Using an Either statement with a NOT statement

$
0
0

Hello,

Just a quick question this time!

I'm trying to refine a search string I setup a while ago, to exclude members of an OU, the issue is that my LDAP search string already uses an EITHER statement.

The current code:

(&(objectCategory=person)(objectClass=user)(|(employeenumber=*)(info=*contractor*)))

So it grabs all users with an employee number or 'contractor' in their info field.

Now, I'd like to exclude users from a Quest OU. However everything I've tried doesn't seem to work... The closest I've gotten:

(&(objectCategory=person)(objectClass=user)(!(OU=*Quest*)(|(employeenumber=*)(info=*contractor*))))Any input would be highly appreciated!



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>