I'm attempting to add an SNMPv3 node using:
$newNodeProps = @{
EntityType = 'Orion.Nodes'
EngineID = $nodeToAdd.EngineID;
DynamicIP = $false;
IPAddress = $nodeToAdd.IPAddress;
IPAddressGUID = $nodeToAdd.IPAddressGUID;
ObjectSubType = "SNMP";
#ROSNMPCredentialID = $nodeToAdd.CredentialID;
SNMPVersion = $nodeToAdd.SnmpVersion;
SNMPV3Username = $credential.securityName;
SNMPV3PrivMethod = $credential.privProtocol;
SNMPV3PrivKey = $credential.privPassword;
SNMPV3PrivKeyIsPwd = $(if($credential.SNMPV3PrivKeyIsPwd -eq 'false'){$false}else{$true});
SNMPV3AuthMethod = $credential.authProtocol;
SNMPV3AuthKey = $credential.authPassword;
SNMPV3AuthKeyIsPwd = $(if($credential.SNMPV3AuthKeyIsPwd -eq 'false'){$false}else{$true});
DNS = $nodeToAdd.DNS;
SysName = $nodeToAdd.SysName;
Caption = $nodeToAdd.SysName;
SysObjectID = $nodeToAdd.SysObjectID;
Vendor = $nodeToAdd.Vendor;
VendorIcon = $nodeToAdd.VendorIcon;
MachineType = $nodeToAdd.MachineType;
Location = $nodeToAdd.Location;
Contact = $nodeToAdd.Contact;
NodeDescription = $nodeToAdd.SysDescription;
}
$newNodeUri = New-SwisObject $swisConnection -EntityType "Orion.Nodes" -Properties $newNodePropsThe $nodeToAdd variable is coming from Orion.DiscoveredNodes. The $credential variable is a CSV I created with our SNMPv3 credentials. When the SNMPV3PrivKeyIsPwd and SNMPV3AuthKeyIsPwd values are set to $false, they DO indeed show up in the database as false (Orion.SNMPv3Credentials), but when I edit the node page, they show up as 'Password is a key' checked (i.e. true). If I test without any changes, it fails. If I uncheck the 'Password is a key' box and test again, it's successful. It's like it's not accepting the value in that field on the newNodeProps. I checked the Out-String values on the newNodeProps and it's showing:
SNMPV3PrivKeyIsPwd False
SNMPV3AuthKeyIsPwd False
Am I doing something wrong or is this possibly a bug?