Escaping quotes and double quotes

Using the backtick (`) works fine for me if I put them in the following places: $cmd=”\\server\toto.exe -batch=B -param=`”sort1;parmtxt=”Security ID=1234″`”” $cmd returns as: \\server\toto.exe -batch=B -param=”sort1;parmtxt=”Security ID=1234″” Is that what you were looking for? The error PowerShell gave me referred to an unexpected token ‘sort1’, and that’s how I determined where to put the backticks. … Read more