Last active
March 16, 2021 07:14
-
-
Save johnbocook/91ea026c835470ba16d4905fc3752d17 to your computer and use it in GitHub Desktop.
Powershell Active Directory Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$username = Read-Host -Prompt 'Type in the username:?' | |
csvde -f searchAD.txt -p subtree -l "sAMAccountName,cn,distinguedName" -r "(&(objectClass=User)(sAMAccountName=$username))" | |
Import-Csv .\searchAD.txt | Out-GridView -Title "Active Directory" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment