Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Receiving "There was an error while trying to deserialize parameter" since 10.5 upgrade

$
0
0

This worked on 1.5 sdk prior to upgrade, failed after NPM 10.5 upgrade, upgraded sdk to 1.6; still fails...  This is a power shell script using the sdk...

 

-----

 

There was an error while trying to deserialize parameter http://schemas.solarwinds.com/2007/08/informationservice:ReadResult.  Please see InnerException for more details.

At C:\PS\file.ps1:202 char:44

+                 $nodeProps = Get-SwisObject <<<<  $swis -Uri $newNodeUri

    + CategoryInfo          : NotSpecified: (:) [Get-SwisObject], InvalidOperationException

    + FullyQualifiedErrorId : System.InvalidOperationException,SwisPowerShell.GetSwisObject

 

-----

 

newNodeUri: swis://<server>/Orion/Orion.Nodes/NodeID=1

 

-----

Connection Code:

  if (!(Get-PSSnapin | where {$_.Name -eq "SwisSnapin"})) {
    Add-PSSnapin "SwisSnapin"
  }

  try {
    $swis = Connect-Swis -Credential $swis_credentials -Hostname $swis_node

  } catch [System.Management.Automation.PSArgumentException] {
    Write-Host "Unable to connect to SWIS, do you have the Swis Snapin installed..?"
    Write-Host $_
    Exit
  } catch {
    Write-Host "Unable to connect to SWIS..."
    Write-Host $_.Exception.GetType().FullName
    Write-Host $_.Exception.Message
    Exit
  }
  Write-Host "Connected to SWIS..."

 

 

Code around error:

line : code

178 :      $newNodeProps = @{

179 :          EntityType="Orion.Nodes";

180 :          IPAddress=$n.IPAddress;

181 :          IPAddressGUID=$n.IPAddressGUID;

182 :          Caption=$n.Caption;

183 :          DynamicIP=$False;

184 :          EngineID=1;

185 :          Status=1;

186 :          UnManaged=$False;

187 :          Allow64BitCounters=$True;

188 :          SysObjectID="";

189 :          MachineType="";

190 :          VendorIcon="";

191 :          # SNMP v2 specific

192 :          ObjectSubType="SNMP";

193 :          SNMPVersion=2;

194 :          Community="pw";

195 :          # polling timing (optional)

196 :          RediscoveryInterval=5; # minutes (5..525600=1 year)

197 :          PollInterval=120; # seconds (1..1200)

198 :          StatCollection=10; # minutes (1..600)

199 :      }

200 :

201 : $newNodeUri = New-SwisObject $swis –EntityType "Orion.Nodes" –Properties $newNodeProps

202 : $nodeProps = Get-SwisObject $swis -Uri $newNodeUri

 

Thank you in advance for your assistance

- Jeremy


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>