This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Disabling "Canned" Alerts

In a recent vSWUG presentation, I mentioned that I (personally) would disable all out of the box alerts.  Within the Orion database, these are referred to as "canned" alerts and you can do it with a simple PowerShell script (assuming you have the SwisPowerShell module loaded).

<# Disable-OOTBAlerts.ps1 #>
$SwisConnection = Connect-Swis -Hostname 'orion.domain.local' `
                               -UserName 'Account' `
                               -Password 'P@ssw0rd'
$Query = @"
SELECT Name
     , Uri
FROM Orion.AlertConfigurations
WHERE Canned = 'TRUE'
  AND Enabled = 'TRUE'
"@
$Alerts = Get-SwisData -SwisConnection $SwisConnection -Query $Query
ForEach ( $Alert in $Alerts ) {
    Write-Host "Disabling OOTB Alert: $( $Alert.Name )"
    Set-SwisObject -SwisConnection $SwisConnection `
                   -Uri $Alert.Uri `
                   -Properties @{ Enabled = 'FALSE' }
}