Hello,
I am trying to write up a Operations Manager PowerShell script that runs automatically and checks the current health status of a group object but only the health status of certain columns listed in the Operations Manager such as "Agent" or "Windows Server 2008 Logical Disk". I have written up the following after setting the group object whose health I wish to check in Operations Manager to "$gp". Also note I am only looking for systems in that group object that show an unhealthy state hence I put in the "Where-Object" to look for anything that is not showing a healthy status.
Get-SCOMMonitoringObject -Group $gp | select HealthState,Displayname | Where-Object {$_.HealthState -notlike "Success"}
This brings back the overall health state of each system in the group object but I do not want the overall health. I wish to only see the health status of say the "Windows Server 2003 Operating System" column in Operations Manager for those systems. I would like to know if there is a simple way to accomplish this using the built in Powershell cmdlets which come with Operations Manager when it installs. If I could also get an example of what the syntax of this would look like that would be a great help.
Thanks!