title: Start-Process and the Stop Parsing (--%) parameter
body: <p>I am having trouble getting the <code>--%</code> parameter to work as expected. My <code>$TaskParams</code> variable has the character <code>'&lt;'</code> which is interpreted as a redirection by powershell, therefore needs to be escaped. </p>
  
  <p>However the following does not work:</p>
  
  <pre><code>$CreateTask = Start-Process PowerShell.exe "$ScriptLocation --% $TaskParams" -Wait -PassThru
  </code></pre>
  
  <p>Without the <code>--%</code>, and when I manually remove any <code>'&lt;'</code> characters, it works:</p>
  
  <pre><code>$CreateTask = Start-Process PowerShell.exe "$ScriptLocation $TaskParams" -Wait -PassThru
  </code></pre>
  
  <p>error received:</p>
  
  <pre><code> Start-Process : A positional parameter cannot be found that accepts argument 
  '--%'.
  </code></pre>
  
  <p>note: I am using PS 5.0</p>
  
  <p>Am I using the <code>--%</code> parameter wrong?  Any help or pointers is appreciated. Thanks</p>