EvotecIT / ADEssentials

PowerShell Active Directory helper functions to manage healthy Active Directory
442 stars 54 forks source link

show-winadgroupmember question #48

Closed paddy75 closed 1 month ago

paddy75 commented 2 months ago

Hello, in my test AD i have the following groups test01 to test10 all are global groups, only test10 is domainlocal each group is nested to the next group, like test01-->test02-->test03 etc. If I do the following: Show-WinADGroupMember -Identity 'test01' -AdditionalStatistics -EnableDiagramFiltering -HideUsers it only shows me test01 in diagram basic and diagram hierarchy and no other groups.

If i query the last group it shows me all nested groups as expected: Show-WinADGroupMember -Identity 'test10' -AdditionalStatistics -EnableDiagramFiltering -HideUsers

maybe i misunderstand the behavior but should it not show all nested groups independent where i start the query??

PrzemyslawKlys commented 2 months ago

I guess it depends on nesting. If you have Test01 and you nest Test02 in it, it should show you that. However if you query fot Test02 and Test01 isn't member of Test02 then its obvious it wont show. So looking in your example it seems. Test10 is the first group in a chain, and Test01 ot other test are direct or indirect group members.

paddy75 commented 2 months ago

it's the other direction. test10 is the last group in chain and tes01 is the first test01 ist member of test02, test02 is member of test03 and so on so it goes from the last to the first group a b c

  1. picture shows the nesting
  2. picture queries test01
  3. picture queries test10
PrzemyslawKlys commented 2 months ago

You said it yourself Test01 is member of Test02. So Test02 has member which is Test01, Test01 has 0 members so nothing is shown. You can use Show-WinADGroupMemberOf if you want to go the other way around. Show-WinADGroupMember goes into "Members" tab and expands on it. It doesn't look at MemberOf.