SCOM 2012 Get-SCOMGroup list of computers

Sometimes you just want to get a list of computers that are members of a group, and just want their names. This is pretty easy using the cmdlet Get-SCOMGroup, just use the –DisplayName switch and add the name of the group and pipe it to the cmdlet Get-SCOMClassInstance. To see what options are available at this point pipe it (GM) Get-Member and you will see a nice list of properties/methods available to the object in the pipe line. An Important Note to make at this point, what is in the pipeline right now are objects, and can still be massaged with PowerShell very easily. So you could sort by DisplayName and then just dump it out to a table (FT) just showing display name. Examples of what is described above:

#to load the opsmgr cmdlets import the module first

Import-Module OperationsManager

# To find out what options are available to your output of the list of objects in the group use Get-Member (GM) cmdlet

Get-SCOMGroup -DisplayName “UR Computer Group” | Get-SCOMClassInstance | GM

# after looking at the GM output we decide that DisplayName will work best

Get-SCOMGroup -DisplayName “UR Computer Group” | Get-SCOMClassInstance | sort DisplayName |FT DisplayName

This is an easy way to get a list of computers that are members of a group. Something that I need to do quite frequently now days. Hope this helps!

One thought on “SCOM 2012 Get-SCOMGroup list of computers

  1. DaveRG

    Thanks for the guide line. Here some comment that I hope might help others.
    I think the path value is more relevant to know the name of the system monitored.
    From a none SCOM MS server here is the command line to run.
    Get-SCOMGroup -DisplayName “UR Computer Grou” -ComputerName “ScomMgmtServer” | Get-SCOMClassInstance -computerName “ScomMgmtServer” | sort Path -Unique |FT Path


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.