Beyond Impact Blog

Recursive SCOM Subgroup Member function

Aug 18, 2017 11:04:44 AM / by Cole McDonald

Sounds Fancy!  The problem I was having was that SCOM doesn't have a default way to look at all of the members of a group/subgroup tree in a convenient way.  The Get-SCOMGroup cmdlet doesn't have an option to recursively search any subgroups it finds.  It requires all kids of clunky Powershell to enumerate all of that if you need it.  I needed it.

Here's the function I came up with for getting at that information.  It takes a group name and returns an array of class instances to make it even more convenient to use in a workflow.  Normal disclaimer for my code: I use backticks to make it easier to read the code since I often have to present it to others.  If you have to change the code at all, keep in mind that there are line continuation backticks.



Did you find this article useful?  Let me know at

If you want to be kept informed, follow our RSS feed:

Learn more about PowerShell in Azure

Beyond Impact is a Cloud Hosting and Managed Services provider based in Minneapolis, Minnesota. 
You can learn more about our Cloud Services at

Tags: powershell, SCOM, Utility Functions

Cole McDonald

Written by Cole McDonald

Internet Pioneer, Digital Futurist

Subscribe to Email Updates

Recent Posts