Link to home
Create AccountLog in
Avatar of pearlvision
pearlvisionFlag for United States of America

asked on

Need LDAP query

I am looking to see if anyone can write a custom LDAP query for me to use in ADUC for 2003 saved queries. I am trying to generate this list from AD: I want to find all users that have the PO Box Field present (populated), but I do not want to include disabled accounts. We use this field for Siebel users and it is the only thing in AD that differentiates these users from non Siebel users.

I have only played with the saved queries in ADUC and not found a good way to combine the 2 criteria using the interface options. Thus I thought a custom LDAP query would work. If you can provide this or show me how I can do it in the interface using the basic features, you can have 500 points!  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of wwwally
wwwally
Flag of Netherlands image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of pearlvision

ASKER

Thanks for the comment. Did not need the step by step, but I am going to give you the points as you pointed me in the right direction and I found the syntax you referenced on the right page. After looking around I found the query that works is (&(objectCategory=user)(postOfficeBox=*))(!userAccountControl:1.2.840.113556.1.4.803:=2).