How do I properly escape the quotes in the -param
value in the following command line?
$cmd="\serveroto.exe -batch=B -param="sort1;parmtxt='Security ID=1234'""
Invoke-Expression $cmd
This of course fails. I tried to escape the quotes (single and double) using the escape character ` and did various combination, but nothing is working.
See Question&Answers more detail:os