I am trying to return the heath state of a particular group in Ops Mgr which
is used by SaVision Live Maps. I want to use this in a monitor so that an
alert can be generated when an object on the map changes. When I use the
below command in PowerShell, I get all the groups in the management group and
their health state:
get-monitoringobjectgroup | ft DisplayName, HealthState
I want to filter this to one particular group at a time, when I use the
following command, I get no results:
get-monitoringobjectgroup | ft DisplayName, HealthState | where
{$_.DisplayName -eq "TRIM"}
I can use the where clause with DisplayName against the get-monitoringobject
cmdlet but not the get-monitoringobjectgroup cmdlet. Maybe this is a bug in
the get-monitoringobjectgroup cmdlet. The DisplayName property is definitely
right, because I can use it with the format-table command.
Any help is greatly appreciated. Thanks,
Justin
You should be doing:
get-monitoringobject|where{$_.displayname -eq "trim"}|ft
displayname,healthstate
Marco
"Justin Cook" <Justi...@discussions.microsoft.com> wrote in message
news:B6C2B4F1-99E3-46E0...@microsoft.com...
Try this:
PS>get-monitoringobjectgroup|gm
This is a .NET collection. I'll need to do a little big of digging to see
how to unpack this (if I can)...
Marco
"Justin Cook" <Justi...@discussions.microsoft.com> wrote in message
news:50FD6D51-2AAE-4FCE...@microsoft.com...
Marco
"Marco Shaw [MVP]" <marco.shaw@NO_SPAMgmail.com> wrote in message
news:O0e#uKr#JHA....@TK2MSFTNGP03.phx.gbl...