recursion - Powershell Get-ADGroupMember -recursive while preserving Group Names -


i need query users, groups , users in these subgroups in ad security group in powershell.

so group example

 group_to_query  - user1  - user2  - user3  - subgroup1   - user4   - user5   - subgroup2    - user6  - user7 

the array should like:

query = @(user1, user2, user3, subgroup1, user4, user5, subgroup2, user6, user7) 

get-adgroupmember -recursive gives me subgroups can´t find proper way preserve groupnames unknown amount/depth of subgroups


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -