Created
February 7, 2018 17:15
-
-
Save royashbrook/6c42708f5d7f23c4cab98bfb26e56af4 to your computer and use it in GitHub Desktop.
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,fullname | |
user1,"user one" | |
user2,"user two" | |
'@ | ConvertFrom-Csv | foreach { | |
$AD = Get-ADUser -Identity $_.username | |
New-Object PSObject -Property @{ | |
UserName = $_.username | |
FullName = $_.fullname | |
Name = $AD.Name | |
GivenName = $AD.GivenName | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment