Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Created February 7, 2018 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royashbrook/458b8cc076867bed62c255fdee081ec9 to your computer and use it in GitHub Desktop.
Save royashbrook/458b8cc076867bed62c255fdee081ec9 to your computer and use it in GitHub Desktop.
# Find users by properties:
Get-ADUser -f {name -like '*ashbrook*'}
Get-ADUser -f {givenname -like '*roy*'}
Get-ADUser -f {surname -like '*ashbrook*'}
Get-ADUser -f {mail -eq 'myemail@domain.com'}
Get-ADUser -Filter {surname -eq "ashbrook"} | measure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment