1 Reply Latest reply on Jul 9, 2014 2:27 PM by ouberlord

    Help with figuring out the AlertInfos parameter for the Acknowledge verb of Orion.AlertStatus

    ouberlord

      Hello,

       

      I am trying to create a PowerShell script that will leverage the Orion SDK to Acknowledge an alert.  I have it all (or at least mostly) figured out, except for one line.  The line in question is:

       

      Invoke-SwisVerb $swis "Orion.AlertStatus" Acknowledge

       

      I have no idea what to supply for the AlertInfo parameter, which is the sole (and required) parameter for the Acknowledge verb of Orion.AlertStatus.  I can see in the XmlSchemas portion of the Metadata.VerbArgument for that verb that there appears to be some clues:

       

      <AlertInfo><DefinitionId></DefinitionId><ObjectType></ObjectType><ObjectId></ObjectId><Notes></Notes></AlertInfo>

       

      However, I have no idea in what format I need to pass those four values.  In my testing, I've tried setting up an array named Alert:

       

      ($Alert = @("1a336459-2225-4bdf-ab0b-d53153b1ab4d", "APM: Application", 230, "Acked")

       

      Then ran the following command:

       

      Invoke-SwisVerb $swis "Orion.AlertStatus" Acknowledge $Alert

       

      However, I just get an error of:

       

      Invoke-SwisVerb : Verb Orion.AlertStatus.Acknowledge cannot unpackage parameter 0

       

      Any ideas?  It seems like I need to pass an array or a hashtable of values and am just structuring it incorrectly.