2 Replies Latest reply on Jul 31, 2015 1:26 AM by bnbhp0

    Unable to connect to swis from remote server - Using Powershell script

    bnbhp0

      Hi All,

       

      Im trying to ack the alerts from remote ticketing tool. I have taken the reference from Re: Re: Re: Re: Third Party Application Acknowledge SolarWinds Event. Here is the code

       

      Add-PSSnapin SwisSnapin

      $swis = Connect-Swis 10.132.104.199 -UserName admin -Password "" 

      $DefID="eb3cfefa-710f-4a20-818b-4bd27836b285"

      $ObjI="251"

      $ObjT="APM: Component"

      $xmlString = "<ArrayOfAlertInfo xmlns='http://schemas.solarwinds.com/2008/Orion'> 

          <AlertInfo> 

              <DefinitionId>$DefID</DefinitionId>

              <ObjectType>$ObjT</ObjectType> 

              <ObjectId>$ObjI</ObjectId>

               <Notes>Closed ticket</Notes>

          </AlertInfo> 

      </ArrayOfAlertInfo>" 

      $xmlElement = ([xml]$xmlString).DocumentElement

      Invoke-SwisVerb $swis Orion.AlertStatus Acknowledge @( $xmlElement )

       

      When i execute this script from SAM server im able to ack the alert.


      But when i try to execute it from remote system im getting following error

       

      Invoke-SwisVerb : An error occurred when verifying security for the message.

      At C:\Users\administrator.HPDEMO\Desktop\myack.ps1:21 char:16

      + Invoke-SwisVerb <<<<  $swis Orion.AlertStatus Acknowledge @( $xmlElement )

          + CategoryInfo          : InvalidOperation: (:) [Invoke-SwisVerb], MessageSecurityException

          + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

       

      Thanks

      Banu