I found this using google search on a post from years ago.
I am quite a beginner when it comes to swispowershell and coding.
I appreciate the talent on this forum.
What I would like a is a swispowershell script that with mute and unmute alerts for a period of time using node names that I provide in a text file. Can anyone help me?
This is what I have found so far:
Import-Module SwisPowerShell
$OrionServer = ''
$Username = ''
$Password = ''
$swis = Connect-Swis -Hostname $OrionServer -Username $Username -Password $Password
##Place the name of the node you want to mute in the nodename field
$entityUris = Get-SwisData $swis "SELECT Uri FROM Orion.Nodes WHERE caption LIKE 'nodenane'"
$entityUris = @( $entityUris |% {[string]$_} )
# Begin Alert Suppresion
Invoke-SwisVerb $swis Orion.AlertSuppression SuppressAlerts @($entityUris, [DateTime]::UtcNow) | Out-Null
# End alert suppression - uncomment, and comment supression line above
#Invoke-SwisVerb $swis Orion.AlertSuppression ResumeAlerts @(,$entityUris) | Out-Null
Thank you in advance