Hi guys,
I am unable to pass array of int32 to ClearAlert using Powershell. Here is my code.
$swis = Connect-Swis -Hostname -Username -Password
$ObjectIds = 7
$intArray = New-Object int[] 1
$intArray[0] = $ObjectIds
Invoke-SwisVerb $swis Orion.AlertActive ClearAlert @($intArray)
The above script returns the error:
Invoke-SwisVerb : Verb Orion.AlertActive.ClearAlert cannot unpackage parameter 0 of type System.Int32[]
I am able to successfully use ClearAlert using the REST by sending this JSON body '{"alertObjectIds":[7]}', but I would prefer to be able to clear it using SwisPowershell.
Thanks for reading I hope someone can help.