Quantcast
Channel: Operations Manager - General forum
Viewing all articles
Browse latest Browse all 11941

Powershell Script to List Monitors With Overrides

$
0
0

I'm trying to get a complete list of all of the monitors and overrides on our SCOM 2012 systems through Powershell. I can pull out the details separately easily enough using Powershell, but I'm struggling to work out how to link them.

List Of Monitors:

$Monitors = Get-SCOMMonitor
"Start" > SCOMMonitors.txt
foreach ($Monitor in $Monitors)
{
Echo "---------------------------------" >>SCOMMonitors.txt
Echo "DisplayName" $Monitor.DisplayName "Id" $Monitor.Id "InstanceName" $Monitor.InstanceName "Name" $Monitor.Name "Identifier" $Monitor.Identifier >> SCOMMonitors.txt
}

List Of Overrides

$Overrides = Get-SCOMOverride
"Start" > SCOMOverrides.txt
foreach ($Override in $Overrides)
{
Echo "---------------------------------" >>SCOMOverrides.txt
Echo "Id" $Override.Id "InstanceName" $Override.InstanceName "Name" $Override.Name "Value" $Override.Value "Identifier" $Override.Identifier $Override.GetManagementPack() >> SCOMOverrides.txt

}

What I'm really interested in is pulling our the effective Priority for all of our Monitors. E.g. A lot of management packs set up Monitors by default with a Priority of High. For some of these we then override this to set it to Medium because if it's High our incident logging system treats it as a high priority incident.

Is it possible to pull out the list of Monitors and check if there is an override for that Monitor, and then display the effective Priority depending on whether an override is there or not?


Viewing all articles
Browse latest Browse all 11941

Trending Articles