LDAP search help
I would like to import all users in AD but eliminate users without an email address.
This works when running a query on AD but not from Kace
(&(samaccountname=*)(ObjectCategory=CN=Person,CN=Schema,CN=Configuration,DC=company,DC=local)(!(userAccountControl:1.2.840.113556.1.4.803:=2))(!(department=Resources))(!(Department=ServiceAccount))(!(!mail=*)))
Kace does not like (!(!mail=*)) which removes users with out email.
Are there any work arounds for this without me adding all users accounts without email to another group and excluding the group?
Cheers
1 Comment
[ + ] Show comment
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
h2opolo25
9 years ago
The way I did it when I was adding my users, I wanted all users that had the Office field populated. So my simple query pulls only users that have physicaldeliveryofficename populated:
(&(&(&(objectCategory=person)(physicaldeliveryofficename=*)(objectCategory=user)
(mail=KBOX_USER)
)))
Note I am using their email address as the username.
I ended up adding all my external and service accounts without email to a group and excluding it: (!(memberOf=NEW-GROUP)) - JayWright 9 years ago