Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our AD is a bit of a mess and I'm trying to tidy things up a little bit. I'm trying to search AD to find anything in the 'Office' field. For example if 'Head Office' is in that box I need to find users who have this entered. See the image below.

ADUC Group

I've tried custom searches but the closest I've found is 'Office Location' which returns nothing. Google is less than helpful on this occasion.

Any tips welcomed.

share|improve this question
up vote 2 down vote accepted

Most fields in active directory aren't really used for anything but custom-development. You can do custom-searches against Active Directory... but they're far-less than pretty. The "Office" field you're talking about is called the "physicalDeliveryOfficeName" in Microsoft's LDAP lookups... so you'd build a query like:

(&(objectCategory=person)(objectClass=user)(physicalDeliveryOfficeName=Head Office))

More information about the search syntax can be found here.

share|improve this answer
Perfect! Thanks very much. – Moif Murphy Jan 25 '12 at 14:28
You can also find more attributes here:… – TheCompWiz Jan 25 '12 at 14:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .