This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Use swisinvoke.exe to set a custom property on a node

Does anyone have an sample of using swisinvoke.exe to set a custom property on a node? I've tried several combinations of possibilities, but nothing seems to be working.

Here's my example:

I have a node with node ID 194

I have a custom property named Ticket

I would like to set the value for Ticket to 12345 for node 194

swisinvoke.exe /u=myusername /p=sercretpassword Orion.NodesCustomProperties.ModifyCustomProperty N:194 Ticket:12345

Output says:

Verb Orion.NodesCustomProperties.ModifyCustomProerty requires 4 parameters not 2

I'm not sure were to find the documentation on what the other parameter would be. C:\Program Files (x86)\SolarWinds\Orion SDK\Schema\3.0\Orion.NodesCustomProperties.html doesn't say, neither does swisinvoke.exe /?, but that does mention an XML file, but I don't know how that should look either. Orion DSK.pdf has only a couple of examples for swisinvoke.exe

I think seeing an example would help quite a bit. I could edit the database directly, but I would prefer to do it this way in the hopes that it will also log the change time and username.

  • SwisInvoke.exe is an older tool that can be used to invoke verbs, but that's it. The Orion.NodesCustomProperties.ModifyCustomProperty verb is used for changing the definition of a custom property - like setting a maximum length for its values.

    To set custom property values, you need use the SWIS "update" operation. One way to do this would be to use the "Set-SwisObject" PowerShell cmdlet, like this:

    $swis = Connect-Swis servername -Username username -Password password

    Set-SwisObject $swis swis://./Orion/Orion.Nodes/NodeID=194/CustomProperties @{Ticket=12345}

    Another way would be to use the Re: SWIS REST/JSON API, like this:

    POST https://localhost:17778/SolarWinds/InformationService/v3/Json/swis://./Orion/Orion.Nodes/NodeID=194

    {"Ticket":12345}

    (See the linked post or the SDK documentation for details about the HTTP headers you need to provide.)