30 March,2020 by Tom Collins
Question: How can I find a list of AD groups with a specific search filter on the name column. ? In this case I want to find all AD groups in the default OU group with a search string.
Answer: Assuming you are in the current Domain group \ OU group , find an example of Get-ADGroup which will filter on the search string "admin"
Get-ADGroup -Filter "name -like '*admin*'" -Properties * | select name
if you need to commit the Get_ADgroup search onto another server - than you'll need to use the -server switch
Get-ADGroup -Filter "name -like '*admin'" -Properties -server "server2.net" | select name
The Get-ADGroup is part of other related AD-Group powershell cmdlets.
Read more on Powershell and Active Directory searches
How to find Active Directory users with Get-ADUser search filter
How to get DOMAIN login name with Powershell Get-ADGroupMember
How to Export Active Directory Group Members with Powershell Get-ADGroupMember
!
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |