Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using the technique from <a href="https://stackoverflow.com/questions/1673967/how-to-run-exe-in-powershell-with-parameters-with-spaces-and-quotes/1674950#1674950">Keith's answer</a> to <a href="https://stackoverflow.com/questions/1673967/how-to-run-exe-in-powershell-with-parameters-with-spaces-and-quotes">How to run exe in powershell with parameters with spaces and quotes</a> question you linked to, running <code>echoargs -verb:dump -source:appHostConfig=$sitename -verbose</code> gave me this output:</p> <pre><code>Arg 0 is &lt;-verb:dump&gt; Arg 1 is &lt;-source:appHostConfig=default&gt; Arg 2 is &lt;web&gt; Arg 3 is &lt;site&gt; Arg 4 is &lt;-verbose&gt; </code></pre> <p>This would explain the invalid argument of <code>appHostConfig=default</code> that <code>msdeploy</code> was seeing.</p> <p>Running <code>echoargs -verb:dump "-source:appHostConfig=$sitename" -verbose</code>, with <code>$sitename = "default web site"</code>, appears to result in the desired arguments:</p> <pre><code>Arg 0 is &lt;-verb:dump&gt; Arg 1 is &lt;-source:appHostConfig=default web site&gt; Arg 2 is &lt;-verbose&gt; </code></pre> <p>Though from your list, it appears that this did not work for you.</p> <p>Another method you might try is building up the list of arguments in an array, which powershell can automatically escape. For example, this gives the same output as above:</p> <pre><code>[string[]]$msdeployArgs = @( "-verb:dump", "-source:appHostConfig=$sitename", "-verbose" ) echoargs $msdeployArgs </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload