Skip to content

Instantly share code, notes, and snippets.

@jd-raymaker
Last active June 5, 2019 19:47
Show Gist options
  • Save jd-raymaker/863afde1f1f08f64b124021fe629751d to your computer and use it in GitHub Desktop.
Save jd-raymaker/863afde1f1f08f64b124021fe629751d to your computer and use it in GitHub Desktop.
AD wildcard supported search
#No need to replace any variables. Copy and paste, then enter the search string.
#Supports wildcards anywhere. Example: *somegroup*
$search = Read-Host "Search for AD Group"; Get-ADGroup -Filter {Name -like $search} | Select name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment