I am struggling getting Custom Properties to add to a new node with powershell. We are successfully adding the node with New-SwisObject, the returning newNodeUri is correct and the $nodeProps is correct as well. The customPropsURI looks correct, the call to Set-SwisObject doesn't return an error. When I browse to the Node thru the UI it shows no custom properties. As well, when I look in the NodesCustomProperties table there are no new rows added. I am sure I am missing something simple, can anyone tell me what I am missing?
$newNodeUri = New-SwisObject $swis -EntityType "Orion.Nodes" -Properties $newNodeProps
$nodeProps = Get-SwisObject $swis -Uri $newNodeUri
$CustomProperties = @{
City = "Somewhere, MO";
Department = "Server";
Model = "Microsoft";
Site_Code = "MO1";
Group = "Operations";
}
$customPropsURI = ($newNodeUri + "/CustomProperties")
Set-SwisObject $swis -Uri $customPropsURI -Properties $CustomProperties