Thursday, September 10, 2009

Search for Ad groups with name containing …

Have you ever noticed that the find function in Active Directory Users and computers (ADUC) console cannot search within a group (or user) name ? You can only search fields that “Starts with” or “ends with” a string. What if I want ton find all groups that contain “web” in their name ?

Here’s how to do it :

  • Select Custom Search from the find dialog
  • Click on the Advanced tab
  • Paste (&(objectCategory=group)(name=*WEB*))
  • Hit then Find Now button

ADUCfind

Oh and don’t forget to replace the “WEB” string by the value you are looking for.

You could also do the same thing from the command line :

dsquery group -name *WEB*