3 Replies Latest reply on May 31, 2013 6:44 PM by derhally

    pollNow verb doesnt work using an AD account although using a local Orion account it works well | SAM

    dariop

      my CODE:

      ====================================

      $applicationTemplateId = 118

      $SQL = "SELECT NN.NodeID, NN.caption as SERVERNAME, ApplicationID, Name, ApplicationTemplateID FROM Orion.APM.Application AA INNER JOIN Orion.Nodes NN ON NN.NodeID= AA.NodeID where ApplicationTemplateID = $applicationTemplateId"

      Write-Output "...$SQL"

       

      $SWIS_Data = Get-SwisData $swis $SQL

      foreach ($Item in $SWIS_Data)

      {

                $tmp_applicationId=$Item.ApplicationID

                $tmp_server=$Item.SERVERNAME

                Write-Output "NODE: $tmp_server >> executing Poll Now for application '$tmp_applicationId'."

                Invoke-SwisVerb $swis "Orion.APM.Application" "PollNow" @($tmp_applicationId) | Out-Null

                Write-Output "....Poll Now for application '$tmp_applicationId' was executed."

                break

      }

       

       

      output ERROR:

      ====================================

      Invoke-SwisVerb : Object reference not set to an instance of an object.

      At D:\data\tcxpda\orion sdk\pollnow_harvest_v1.ps1:69 char:18

      +         Invoke-SwisVerb <<<<  $swis "Orion.APM.Application" "PollNow" @($tmp_applicationId) | Out-Null

          + CategoryInfo          : InvalidOperation: ( , FaultException`1

          + FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb

       

      Executing same script but logged in Orion with a local account (with nodeManagement permission =  true), it works well.

       

      I'm using SDK 1.6, same error happens with SDK 1.5