Help Get member of with nested group membership in more levels and save output

Hi i am looking for a script that can give me a list over what a user is member of incl. nested group example output see below

In a sortet hierarchy

I am stock and hope that someone out here could give me a lead




Group 2.1

Group 3

Group 3.1

Group 3.1.1

Frankly, you wont get a ready made script from the forums, but can guide you so that you can start writing it.

You would use Get-AdUser, Get-ADGroup cmdlets , may be you could use ForEach-Object as well. I suggest you reading the documentation of those cmdlets and start writing the script. You can update this thread with any blockers/errors you face using/writing the script.

this might get you close

This sort of thing is all over the web. Just use your favorite search engine to fine them …






Thanks just what I was looking fore :slight_smile: much appreciated