The Uri for a node has the format swis://$($hostname)/Orion/Orion.Nodes/NodeID=$($NodeID). It has to be NodeID - you can't just filter on other properties here. If you only have the sysname at this point in the script, you will need to run a SWQL query to get the NodeID (or just get SWIS to send you the whole Uri).
Changing the Location property in Orion will not cause the device's location field to be changed - it will be overwritten next time that field gets polled. I think that's on the Rediscovery interval.
If you have NCM, you can use the "execute script" feature to push out location field updates. https://github.com/solarwinds/OrionSDK/wiki/NCM-Config-Transfer#verb-executescript