Passing double quotes through PowerShell + WinRM
问题 I am using this code to execute remote code (MSI installs) on a server. Passing double quote through the script is just not working. I tried two variations as given below (#3 and #4) along with the outputs. Input #1 (Simple case to test double quotes in the command) powershell.exe -inputformat none -File client.ps1 -target 1.2.3.4 -port 5985 -password "pass" -username "user" -command "echo hello" Output (Works) hello Input #2 (Understandable, this won't work) powershell.exe -inputformat none