I am trying to check Active directory group memberships snf display them in a list not a grid. Looking for alternative to Out-Gridview
""Get-ADUser –Identity Username_Here -Properties Name, memberof | select memberof | Out-GridView -Title 'Group Memberships'""
CodePudding user response:
The property MemberOf
is an array. If you want to display its elements separated you have expand the array like this:
Get-ADUser –Identity 'Username_Here' -Properties Name, MemberOf |
Select-Object -ExpandProperty MemberOf |
Out-GridView -Title 'Group Memberships'