Skip to content

Instantly share code, notes, and snippets.

@heywoodlh
Created August 31, 2017 16:02
Show Gist options
  • 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