Find AD Security Group Membership from Powershell

Ok... So I need to know how to determine all the users a particular Security Group is applying to.    

I'm able to find the members using this command:

 Get-ADGroupMember "SecurityGroup" | Select Name, SamAccountName, objectClass

Open in new window

The problem is, the particular SG that I'm looking at only has SG members.   I'm having a difficult time figuring the puzzle out...   I need a list of the users.

Group 1
- Group 2
- - Group Member 1
- - Group Member 2
- - Group Member 3
- - - Group 4
- - - - Group Member 6
- Group 3
- - Group Member 4
- - Group Member 5
- - Group Member 6
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

C_ParlatoAuthor Commented:
I hate it when I ask a question and don't think about it.  

Get-ADGroupMember "VM09RDP" -Recursive | Select Name, SamAccountName, objectClass

Open in new window

I just needed to add recursive...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.