Last active
December 6, 2016 15:05
-
-
Save danjpadgett/db4a867979a69dccd7f3192710d0f714 to your computer and use it in GitHub Desktop.
get ad user info from list
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
ForEach ($user in $users) { | |
Get-ADUser -Filter{displayName -like $user} -Properties canonicalname | select name,samaccountname,enabled,canonicalname,@{Name='Groups';Expression={((Get-ADPrincipalGroupMembership $_.samaccountname).name) -join ', '}} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment