Last active
December 25, 2015 05:09
-
-
Save iainelder/6922600 to your computer and use it in GitHub Desktop.
Output as a table all the active directory groups I am a member of. Is there a more elegant way to turn a list into a column?
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
@('iain', 'admin_iain') | | |
% { | |
$id = $_ | |
(Get-ADPrincipalGroupMembership -Identity $id | Select -ExpandProperty name) | | |
% { | |
@{ $id = $_ } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment