I would like to assign custom properties to the nodes found via query. As an example I would like to assign all devices in the 10.22.0.0/16 range the custom property Environment "QA". The custom properties are already in place. The script returns the Uri's I am after. I do not know how to assign the new custom properties however.
$ErrorActionPreference = 'Stop'
#Add the snapin
Add-PSSnapin SwisSnapin
#create a connection to solarwinds
$hostname = 'xx'
$username = 'xx'
$password = 'XX'
#swis = Connect-Swis -Hostanme $hostname -Trusted
$swis = Connect-Swis -Hostname $hostname -Username $username -Password $password
$query = Get-SwisData $swis "SELECT uri FROM Orion.Nodes WHERE ip_address LIKE '10.22.%'"
$query
swis://XX.net/Orion/Orion.Nodes/NodeID=151
swis://XX.net/Orion/Orion.Nodes/NodeID=116
swis://XX.net/Orion/Orion.Nodes/NodeID=146