List subgroups and its membership details of a master group

Welcome Forums General PowerShell Q&A List subgroups and its membership details of a master group

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
3 months ago.

  • Author
    Posts
  • #108293

    Participant
    Points: 0
    Rank: Member

    Hi All,

    I am new to powershell. I am trying my best to come up with a script to get membership details of a subgroup along with the account details. My head is spinning all around to get this. Could anyone of you help me with this. Below is what i have right now.

    Get-ADGroupMember "-app-InsuranceRefunds-UK" -Identity $($group.name) -Recursive | %{Get-ADUser $_ -properties displayname,Enabled} | Select samaccountname,displayname | Export-Csv C:\Temp\allthegroups.csv

    Group——>members details ( there are groups in this as well)

    subgroups that are part of member of the primary group——member details of this subgroup and so on

    with the account status, whether it is enabled or disabled.

    Thank You

    Jeevan

  • #108296

    Participant
    Points: 160
    Helping Hand
    Rank: Participant

    Reporting on Active Directory is something that just about everyone needs and there are bunch of Active Directory reporting tools built in Powershell to get what you want. There are probably millions of threads asking what you are attempting to do. My recommendation is to do some research and test some solutions in a dev environment to see if it will meet your needs. An example:

    https://community.spiceworks.com/topic/1472794-how-to-table-all-ad-groups-and-members-of-each-group-then-export-to-csv-psscript

    Reporting scripts can be basic to super-advanced, but even reading them should help you with your logic and probably things you were not even thinking about.

The topic ‘List subgroups and its membership details of a master group’ is closed to new replies.