I'm trying to pass an argument into a PowerShell script that is an URLEncoded string with a SAM variable embedded.
For example. The argument in plain next would be - 'https://${Node.DNS}/website/api?blah123=5'
Because SolarWinds powershell cannot pass an equal sign via argument we need to URL encode/decode the string.
I would then URLEncode the argument to https%3a%2f%2f%24%7bNode.DNS%7d%2fwebsite%2fapi%3fblah123%3d5
I then URLDecode that argument in my script but it will not translate the ${Node.DNS} variable.
I get a literal output of 'https://${Node.DNS}/website/api?blah123=5'
Not the value of ${Node.DNS}
During my testing I found that URLDecoding 'https%3a%2f%2f${Node.DNS}%2fwebsite%2fapi%3fblah123%3d5'
actually parsed the Node.DNS variable correctly within that system.string.
I'd rather not do mixed URLEncoding/Decoding in my argument so I'm trying to understand why SAM PowerShell is not able to parse the Node.DNS variable once URLDecoded.