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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In ADUC create a new query and name it.
Then select define query and select "Custom search".
On the advanced tab create the query.
This should be something like:
Klik OK and OK and there should it be.
The ldap query is case sensitive.

Some LDAP reading.

Good luck,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pearlvisionAuthor Commented:
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).

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.