Hi all,
I want to add WMI node via SWIS. But I must input any WMI credential setting to that node. Is there any way to do this?
SDK 1.9 (http://downloads.solarwinds.com/solarwinds/Release/Orion/OrionSDK-1.9.zip) includes a PowerShell sample for adding a WMI node. Note that the credential you want to use for the node must be entered through the website - then the script just references it.
Thank you tdanner. I got it and added credential (node settings) to WMI node. I have one more question about update node settings. I use that below code for update node settings but I got an error.
swis.Update("Orion.NodeSettings", new PropertyBag
{
{"NodeID", nodeID},
{"SettingName", settingName},
{"SettingValue", settingValue}
});
Error:
Error executing update operation: Invalid SWIS uri at character 18: Incomplete uri. Parser did not finish in End state, but instead was left in Scheme state
Parameter name: uri
Orion.NodeSettings
NodeID: 5
SettingName: WMICredential
SettingValue: 3
I didn't understand what the uri is to use. Can you help me how to update wmi credential on node settings?
In this case you are making a new entry for Orion.NodeSettings, so you should call swis.Create with those arguments, not swis.Update.
Thanks tdanner. In this case, I didn't think to call Create, instead of Update.