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

/Frank

group1

group2

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

https://gallery.technet.microsoft.com/scriptcenter/Get-nested-group-15f725f2

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

http://vcloud-lab.com/entries/active-directory/powershell-active-directory-list-complete-hierarchy-of-upstream-nested-groups-recursively-of-user

http://www.vcloud-lab.com/entries/active-directory/powershell-active-directory-show-treeview-of-user-or-group-memberof-hierarchy

https://social.technet.microsoft.com/Forums/office/en-US/1fda5252-bd0f-4615-8238-cf08537b741f/powershell-list-active-directory-group-hierarchy

 


 

 

 

 

https://superwidgets.wordpress.com/2019/06/19/get-sbadgroupmembers-function-added-to-azsbtools-powershell-module/

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