Created
June 28, 2013 19:15
-
-
Save rodmhgl/5887289 to your computer and use it in GitHub Desktop.
PowerShell snippet - requires Quest AD Tools - will search Active Directory for the given Display Name, and return the samaccountname, display name, office, and telephone number for matching users
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
function Get-SamAccountName { | |
param ($DisplayName) | |
Get-QADUser -DisplayName "*$DisplayName*" | select samaccountname, displayname, office, telephonenumber | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment