Parsing arguments containing = to powershell script

Hi!,

I’m trying to pass something like the following arguments, how can I literal quote it so it sends the == to the script? The value for key should be blahblah21387532== I think its seeing the first = and thinking its a new arg.

server=server1;thing=thingo;key=blahblah21387532==

Good question! The arguments get split on ; then on = so in fact you can’t use either of those in argument values, which is likely going to be a problem unless you can encode the value differently. I’ll see if we can add escaping of special characters.

wonder if 0x3d (hex =) would work since its powershell, I’ll give it a go tomorrow.

Escaping it would be super helpful though.

Yeah we’ll add escaping with \ such as server=server1;thing=thingo;key=blahblah21387532\=\= and get it into the next update. A workaround would be to have a script just for this task (with the arguments you need set in the script itself) , which then calls your other script.

I see this is in the latest patch notes, it’s not going to affect other existing arguments we have that are say like

path=c:\temp\file.txt;linuxpath=~/file.txt

is it? since they use the \ character as well

No, but it does break certain combinations, which is a good point.

Working:
path=c:\temp\file.txt;linuxpath=~/file.txt
path=c:\temp\folder;linuxpath=~/file.txt

Changed behaviour (where \ precedes ;):
path=c:\temp\folder\;linuxpath=~/file.txt [Does not work]
path=c:\temp\folder\\;linuxpath=~/file.txt [Works]

We’ll need to see how much of a problem this becomes for users and if it becomes apparent that it’s not going to work we’ll need to add an option to disable delimited characters