Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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: msdn.microsoft.com/en-us/library/windows/desktop/… –  TheCompWiz Jan 25 '12 at 14:29
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.