• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 523
  • Last Modified:

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.
1 Solution
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,

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).


Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now