I want to close active alerts older than 15 days and re-trigger if the condition exists. I dod not find any easy way and I know it can be done using SWIS PowerShell. Does anyone have script which is working?
I am getting error while trying this one
$alertid = @(Get-SwisData $swis 'SELECT AlertActiveID FROM Orion.AlertActive WHERE TriggeredDateTime < GETDATE()-355')
Invoke-SwisVerb $swis Orion.AlertActive ClearAlert $alertid
Invoke-SwisVerb : Verb Orion.AlertActive.ClearAlert cannot unpackage parameter 0 of type System.Int32[]
At line:2 char:1
+ Invoke-SwisVerb $swis Orion.AlertActive ClearAlert $alertid
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb
Please help to solve this. I am new to SWQL