Last active
December 6, 2016 15:05
-
-
Save danjpadgett/adbfc1b522b3bc9184b17f6b58eeea6e to your computer and use it in GitHub Desktop.
Get AD user Info
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
Get-ADGroupMember "Domain Admins" | select name,samaccountname, @{Name='Enabled';Expression={(Get-ADUser $_.samaccountname).Enabled}},@{Name='Location';Expression={(Get-ADUser $_ -Properties * ).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