PowerShell one-liner to view SCOM Overrides

Sometimes when you look at the overrides of a certain monitor/rule in SCOM and the list is huge. The problem is it cannot be sorted and very unreadable. PowerShell to the rescue!

There are many approaches to this but I like to use a one-liner to display not only the overrides but also the targets.


Get-SCOMMonitor -DisplayName <some_name_here> | Get-SCOMOverride | Select Parameter,@{Name='Target';Expression={(Get-SCOMClass -Id $_.Context.id).DisplayName}},Value,Enforced | Out-GridView

I start by getting the monitors I want to check Overrides on | now I get the overrides for each monitor | select specific property | outing the result to a nice table.

During the property selection, I’m working with a property called Context. Context property holds a GUID to the target , which is not very readable. I use the following calculated value to get the actual name of the property. Calculated properties are very handy when you want to play with the result, you can read about it more here.

try it out and let me know how that works out for you!

What do you think about this post?