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

Answer Summary:
Cancel
1 Comment   [ + ] Show Comment

Comments

  • Thanks for the reply. This was my first post and it took two days for IT Ninja to approve my account and this post to become public.

    I ended up adding all my external and service accounts without email to a group and excluding it: (!(memberOf=NEW-GROUP))
Please log in to comment

Answers

0
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.
Answered 02/24/2015 by: h2opolo25
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share