title: How do I pass in a string with spaces into PowerShell?
body: <p>Given:</p>
  
  <pre><code># test1.ps1
  param(
      $x = "",
      $y = ""
  )
  
  &amp;echo $x $y
  </code></pre>
  
  <p>Used like so:</p>
  
  <pre><code>powershell test.ps1
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>&gt; &lt;blank line&gt;
  </code></pre>
  
  <p>But then this goes wrong:</p>
  
  <pre><code>test.ps1 -x "Hello, World!" -y "my friend"
  </code></pre>
  
  <p>Outputs:</p>
  
  <pre><code>Hello,
  my
  </code></pre>
  
  <p>I was expecting to see:</p>
  
  <pre><code>Hello, World! my friend
  </code></pre>