Skip to content

Instantly share code, notes, and snippets.

@royashbrook
Created February 7, 2018 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royashbrook/6c42708f5d7f23c4cab98bfb26e56af4 to your computer and use it in GitHub Desktop.
Save royashbrook/6c42708f5d7f23c4cab98bfb26e56af4 to your computer and use it in GitHub Desktop.
@'
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