Search Active Directory Groups with Wildcard

Binoculars  (Photo credit: Wikipedia) Binoculars (Photo credit: Wikipedia).

If you have tried searching for an Active Directory Group using characters in the middle of the name, you may have found that the GUI ADUC (AD Users and Computers) tool does not support this kind of “wildcard” search in the default configuration.

To work around this problem, my recommendation is to use the PowerShell ActiveDirectory module. See the following for some hints on how to use:

  • Open the PowerShell command window
  • Get-Module -ListAvailable
  • Import-Module ActiveDirectory
  • Get-ADGroup -Filter {name -like "*aid*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name
  • Get-ADGroupMember YourGroupName # to list members
  • Using a “-like” filter against the “name” property allows the standard wildcard match (*/star/asterisk/glob) which will match any sequence of characters within the group name.
  • This example would match group names like: Aids-Research, Hearing-Aids, Raiders, etc.

I’m not sure why ADUC is missing this type of AD wildcard group search, but at least this is a simple way to do the search with Microsoft standard tools ;-). ADUC does the standard starts-with type of search, so it works for groups where you know the starting characters to search for. See comments of this post for a hint on using ADUC “Custom Search” Advanced search for patterns like name=*something* (ldap query syntax used for advanced custom search).

Advertisements

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in System Administration and tagged , , , . Bookmark the permalink.

2 Responses to Search Active Directory Groups with Wildcard

  1. Philip says:

    I came across this post, aduc actually have a solution for it, go to find, chose custom search in drop down, go to advanced tab and type: name=*something*

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s