Link to home
Start Free TrialLog in
Avatar of Pau Lo
Pau Lo

asked on

powershell AD report sub group count clarifacation

I picked up this command from EE which gives a head count per security group. Does anyone know if the following command will also factor in its count, “group members within sub groups”? Or will it only enumerate the first level of sub groups and their members? or does it keep going as far down the hierarchy as necessary.

Get-ADGroupMember -Identity <Group> -Recursive | Measure-Object | Select-Object -ExpandProperty Count


Does anyone know how it could be changed to not only give the count (of total members including sub groups), but also give the details of all members as well (including the sub groups)?
ASKER CERTIFIED SOLUTION
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial