Bulk resetting SCOM monitor alerts

JuanitaHowe-4759 100 Reputation points
2024-06-16T17:17:57.6266667+00:00

Is there a way to bulk reset SCOM monitor alerts using a PowerShell script?

I'm responsible for server OS patching each month, and even though we use SCCM to suppress alerts during patch windows, we still get noise in SCOM which I manually recalculate to close the alerts. I want to run a script that can easily reset the monitors and provide a better picture of actual health.

Should I run this script against each of the Management Servers? I have reconciled all of the scopes, but it's not feasible to reset each alert one at a time.

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
1,012 questions
{count} votes

Accepted answer
  1. Kurt Bowden 75 Reputation points
    2024-06-17T12:03:03.64+00:00

    Hello,

    You can use a PowerShell script to bulk reset SCOM monitor alerts, reducing manual effort. Run the script from a machine with the SCOM PowerShell module installed. Connect to your SCOM management server, retrieve all active alerts, and reset each monitor state. Here’s a sample script: HPInstantInk

    Import-Module OperationsManager
    New-SCOMManagementGroupConnection -ComputerName "YourManagementServerName"
    $activeAlerts = Get-SCOMAlert -ResolutionState 0
    
    foreach ($alert in $activeAlerts) {
        $monitoringObject = $alert.MonitoringObject
        $monitor = $alert.Monitor
        if ($monitor -and $monitoringObject) {
            Write-Host "Resetting monitor $($monitor.DisplayName) for $($monitoringObject.DisplayName)"
            Reset-SCOMMonitoringObject -MonitoringObject $monitoringObject -Monitor $monitor
        } else {
            Write-Host "Skipping alert $($alert.Name)"
        }
    }
    
    Write-Host "Monitor reset process completed."
    

    Run this script on a server with the appropriate permissions. Adjust the script if you need to filter alerts based on specific criteria.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.