4 Replies Latest reply on Jun 3, 2015 7:53 PM by brent.weaver@ge.com

    Issue removing Nodes with swis api

    brent.weaver@ge.com

      PS C:\Users\212040597> Get-SwisData $swis "Select uri from Orion.Nodes Where caption='RD000D3A31B738'"

      swis://opswusvmmona01./Orion/Orion.Nodes/NodeID=243

      PS C:\Users\212040597> $uri = Get-SwisData $swis "Select uri from Orion.Nodes Where caption='RD000D3A31B738'"

      PS C:\Users\212040597> $uri

      swis://opswusvmmona01./Orion/Orion.Nodes/NodeID=243

      PS C:\Users\212040597> Remove-SwisObject $swis $uri

      Remove-SwisObject : Object reference not set to an instance of an object.

      At line:1 char:1

      + Remove-SwisObject $swis $uri

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

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

          + FullyQualifiedErrorId : SwisError,SwisPowerShell.RemoveSwisObject

      PS C:\Users\212040597>

       

      What am I doing wrong? Ultimately I need to remove multiple nodes at once and I do know the criteria:

       

      Select uri from Orion.Nodes where caption like 'RD%'

       

      I will need to remove all nodes that being with RD... Any help is MUCH appreciated.