'Get AD Group Member Groups and Find Those Group Notes in One Query
I would like to find an AD group user's group's that their in and to find what those different group's notes are.
Right now, I'm trying this
Get-ADPrincipalGroupMembership "username" | Get-ADUser -Properties info,description
Which is giving errors. I know there must be an easy way to do this that I'm missing.
Solution 1:[1]
I believe this is what you're looking for, query the user's MemberOf attribute and for each group, query the group's Info and Description attributes (I've also added Name so you have that reference which I believe is important to have):
(Get-ADUser "username" -Properties MemberOf).MemberOf |
Get-ADGroup -Properties Name, Info, Description |
Select-Object Name, Info, Description
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Santiago Squarzon |
