RSGs “One-Liners”

This page features some of MY most used one-liners. It could be SQL queries, Powershell scripts or any other SCOM related one-liner.


List all SCOM objects in Maintenance Mode

Get-SCOMMonitoringObject | where-object {$_.InMaintenanceMode -eq $true}

(SQL Query)

Set all SCOM agents to Remote Manageable

UPDATE MT_HealthService
SET IsManuallyInstalled=0
WHERE IsManuallyInstalled=1


List all alerts generated by a rule

get-scomalert -criteria ‘ResolutionState = ”0”’ | where-object {($_.IsMonitorAlert -eq $False)}