14 Kasım 2015 Cumartesi

SCOM 2012 R2 Close All Alerts Script

This script will close all alerts in the console.
$RMSrv = “RMSSERVERNAME”
Add-PSSnapin “Microsoft.EnterpriseManagement.OperationsManager.Client”
Set-Location “OperationsManagerMonitoring::”
New-ManagementGroupConnection -ConnectionString:$RMSrv
Set-Location $RMSrv
$alerts = get-alert |where-object {$_.ResolutionState -eq 0}
foreach($alert in $alerts)
{
resolve-alert -comment “Resolving Alert” -Alert $alert
}

Hiç yorum yok: