Reputation: 1
I managed to get the list of list of specific user's group and description using below script
Get-ADPrincipalGroupMembership %username%| Get-ADGroup -Properties * | select name, description
However it is not displayed a list of full details and almost all groups and descriptions ended up with .... like below but I need to get full details.
SFO-GF-XXXXXXX-SERVICES1-YYYY-C
SFO-GF-XXXXXXX-SERVICES2-WWWWWW...
XXX-GF-N-DATA-FIN-YYY-00MWWWMFIN-2... Read-only access to N:\DATA\XXXXXX\...
XXX-GF-N-DATA-FIN-YYY-00MWWWMFIN-2... Read-only access to N:\DATA\XXXXXXX\...
XXX-GF-N-DATA-FIN-YYY-00MWWWMFIN-2... Read-only access to N:\DATA\XXXXXXX\...
Is there other command to display the list of full details?
Upvotes: 0
Views: 824
Reputation: 1016
Try this
$username = Read-Host 'Please enter Username!'
Get-ADPrincipalGroupMembership $username | Get-ADGroup -Properties * | select name, description | fl
what is %username% ? it should be $env:username
Upvotes: 1
Reputation: 332
Does piping to Format-Table or Format-List help?
Get-ADPrincipalGroupMembership %username% | Get-ADGroup -Properties * | select name, description | Format-Table
Upvotes: 0