I want to get the quoted string in the line below into a string exactly as-is, but I am tripping on the necessary escape sequences for Ruby. mycommand.cmd
is really a wrapper for powershell.exe so I want to preserve everything between the quotes, and hold onto the escape characters that are already there.
mycommand.cmd "^|foreach-object { \"{0}=={1}\" -f $_.Name, $_.Found }"