11 Replies Latest reply on Mar 24, 2017 10:08 AM by mlandman

    Remove-SwisObject : mismatched input 'False' expecting 'Identifier' in Select clause - Is this a bug?

    mlandman

      Trying to script delete of nodes. Works in the QA environment and fails in PRD.

       

      Get the URI here:

      if (-not (Get-PSSnapin | where {$_.Name -eq "SwisSnapin"})) 
      {
          Add-PSSnapin "SwisSnapin";
      }
      $swis = Connect-Swis -host SolarWindsOrionServer -UserName 'REDACTED' -Password 'ALSO_REDACTED'
      $a = Get-SwisData $swis 'SELECT Uri FROM Orion.nodes where caption = @host' @{host = 'Test123456'}
      Remove-SwisObject -SwisConnection $swis -Uri $a 
      

       

      This returns the following:

      Remove-SwisObject : mismatched input 'False' expecting 'Identifier' in Select clause

      At line:1 char:1

      + Remove-SwisObject -SwisConnection $swis -Uri ([string]$a)

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : InvalidOperation: (:) [Remove-SwisObject], FaultException`1

          + FullyQualifiedErrorId : SwisError,SwisPowerShell.RemoveSwisObject

       

      $a.getType() returns that it is a string

       

      I have tried several formats including using the literal URI string:

      Remove-SwisObject -SwisConnection $swis -Uri 'swis://FCDARSVRMSQ23P.fcb.com/Orion/Orion.Nodes/n:9608'

       

      What am I missing?

      We're running the following:

      PRD on Win 2008 R2

      Orion Platform 2015.1.3, NCM 7.4.1, SRM 6.2.1, WPM 2.2.1, DPA 10.0.1, NPM 11.5.3, IVIM 2.1.1, QoE 2.0, SAM 6.2.3, NTA 4.1.2

       

      QA on Win 2012 R2

      Orion Platform 2015.1.3, NCM 7.4.1, SRM 6.2.1, WPM 2.2.0, DPA 10.0.1, NPM 11.5.3, IVIM 2.1.1, SAM 6.2.3, NTA 4.1.2

       

      Attached is the tail end of C:\ProgramData\Solarwinds\InformationService\v3.0\Orion.InformationService.log that has the failure. The last attempt is as close to 2017-03-21 15:18:00 as I could manage.