Which groups is a particular computer member of?

Given that groups are used for role based security, overrides, reports, and some other features, it might be pretty interesting to know what groups is a particular computer member of. Attached is a sample script that dumps the list of groups that a particular computer is a member of.

Steps to run the script:

1 - Save the script file

2 - Open the OpsMgr command shell

3 - Run the following: C:\GetContainingGroups.ps1 -computerFQDN:'server1.contoso.com'

 

GetContainingGroups.zip