Find an AD Group Using a Wildcard

19 Sep, 2022·
AlexIn Tech
AlexIn Tech
· 1 min read

Find an AD Group Using a Wildcard

If you try searching for an AD group using the “dsa.msc” tool, you’ll notice it cannot search for a group based on a partial name. It doesn’t support wildcards.

To perform such searches, we will use the PowerShell Active Directory module.

You can install it with the following command:

Import-Module ActiveDirectory

Once the module is installed, use the following command and replace “PartOfMyGroup” with the part of the group name you’re looking for:

Get-ADGroup -Filter {name -like "*PartOfMyGroup*"} -Properties Description,info | Select Name,samaccountname,Description,info | Sort Name

This will give you all AD groups that contain the specified text in their name.

Enjoy! 😎

Share
AlexIn Tech
Authors
SysOps Engineer | IT Consultant | IT Teacher
Alexis is a SysOps Engineer and IT teacher at ETML in Lausanne. Rooted in systems and infrastructure, he combines automation and custom development with a growing interest in AI to solve practical problems. He offers IT consulting, custom solutions, and hosting.