Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Created August 31, 2017 16:02
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 heywoodlh/bf850a9d874f113183a387b33cf32e70 to your computer and use it in GitHub Desktop.
Save heywoodlh/bf850a9d874f113183a387b33cf32e70 to your computer and use it in GitHub Desktop.
Active Directory Account Lookup
$domainServer = 'ad1.mydomain.com'
$user = Read-Host -Prompt 'Last Name: '
get-aduser -f {SurName -eq $User}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment