cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 11

Listresource.ps1 Swis function is not working in SAM 2019.4.1

Dear Community Experts,

We are checking below functionality using Powershell

https://support.solarwinds.com/SuccessCenter/s/article/Update-resources-on-an-agent-node-using-SWQL

I have installed Orion.SDK and imported powerOrion,SwisPowerShell modules

But facing below issue, while executing.. "

.\ImportListResources.ps1 $swis 2 600
Creating schedule list resources job...
Waiting until job status will be 'ReadyForImport'...
Importing list resources...
Invoke-SwisVerb : Could not load file or assembly 'SolarWinds.Interfaces.Discovery.Strings, Version=3.5.0.638,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
At C:\SAM\New folder\OrionSDK-master\Samples\PowerShell\ImportListResources.ps1:72 char:17
+ ... ortResult = Invoke-SwisVerb $swis "orion.nodes" "ImportListResourcesR ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb
Import of ListResources result for NodeId:2 finished with errors.
At C:\SAM\New folder\OrionSDK-master\Samples\PowerShell\ImportListResources.ps1:76 char:5
+ throw ("Import of ListResources result for NodeId:" + $nodeId + " ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Import of ListR...ed with errors.:String) [], RuntimeException
+ FullyQualifiedErrorId : Import of ListResources result for NodeId:2 finished with errors.

Problem is exactly at below function;

$importResult = Invoke-SwisVerb $swis "orion.nodes" "ImportListResourcesResult" @($jobId, $nodeId)

In SAM 2019.1 , Noticed that in Swis ,it is looking for version '3.5.0.638' ,while actually we have a updated version '3.5.0.652' in Orion application files

Application file: SolarWinds.Interfaces.Discovery.Strings.dll

Path :C:\Program Files (x86)\SolarWinds\Orion\Interfaces.Discovery

Current Version : 3.5.0.652

 

Looking forward for any solution on this

0 Kudos
11 Replies

The article mentions the minimum version for that feature is 2019.4 so you have to upgrade the whole application to at least that version to use the command.
- Marc Netterfield, Github
0 Kudos

@mesverrum , We are testing it in SAM 2019.4.1,, which is built on ORION platform 2019.4 ,, rightee
0 Kudos

Your original post said just 2019.1, haven't run into the problem you describe.
- Marc Netterfield, Github
0 Kudos

Sorry for the mistake,, And thanks for responding back to this,,we are testing it in Sam 2019.4.1 evaluation version,,
0 Kudos

Does Swis functionality have any limitation on evaluation version
0 Kudos

To my knowledge there are no limitations in an evaluation version with regards to the SDK/API

In SAM 2019.4.1 , Noticed that in Swis ,it is looking for version '3.5.0.638' ,while actually we have a updated version '3.5.0.652' in Orion application files.

Has anyone had any similar issues noticed previously,, during product upgrades

0 Kudos

Hi @dhinagar_j,

I am getting the same error:

Invoke-SwisVerb : Could not load file or assembly 'SolarWinds.Interfaces.Discovery.Strings, Version=3.5.0.638,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

0 Kudos

I still not able to overcome the mentioned issue, I tried with both SAM 2019.4 and SAM 2019.4.1 versions.. The issues still exist . I have raised a official  support case with Solarwinds, Awaiting their response

0 Kudos

Official support won't be able to help with anything in the API/SDK unfortunately. All you can do is raise tickets here and submit issues on the github.
- Marc Netterfield, Github

As suggested created a issue in github,

I could also see many issues already created for the same.

dhinagar_j_0-1588143250005.png

Kindly requesting some help to repair it

 

0 Kudos