Created
          June 28, 2013 19:19 
        
      - 
      
 - 
        
Save rodmhgl/5887321 to your computer and use it in GitHub Desktop.  
    PowerShell - Searches Active Directory for a given SAMAccountName, returns SAMAccountName, displayname, office, telephonenumber
  
        
  
    
      This file contains hidden or 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-RealName { | |
| param ($SAMAccountName) | |
| Get-QADUser -SamAccountName $SAMAccountName | select samaccountname, displayname, office, telephonenumber | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment