title: Powershell ISE "Illegal characters in path" when piping paths to test-path?
body: <p>I have the following script in Powershell <strong>ISE</strong>.</p>
  
  <pre><code>cd E:\Data
  @"
  xxxx.zip
  yyyy.zip
  "@ -split "`n" | % { echo "'$_'"; test-path -path "$_" -EA Stop }
  </code></pre>
  
  <p>However it always raises error.</p>
  
  <pre><code>'xxxx.ZIP'
  False
  Illegal characters in path.
  At line:175 char:27
  + % { echo "'$_'"; test-path &lt;&lt;&lt;&lt;  -path "$_" -EA Stop }
      + CategoryInfo          : InvalidArgument: (E:\Data\xxxx.ZIP:String) [Test-Path], ArgumentException
      + FullyQualifiedErrorId : ItemExistsArgumentError,Microsoft.PowerShell.Commands.TestPathCommand
  </code></pre>
  
  <p>However, I can run <code>Test-Path -path xxxx.zip</code> or just hard code 'xxxx.zip' in the script and it runs fine. What's the problem of piped string?</p>
  
  <p><strong>Update</strong></p>
  
  <p>If I change the last script to <code>% { echo "'$_'"; "test-path -path $_ -EA Stop" }</code> and copy/paste the output ("<code>test-path -path xxxx.ZIP -EA Stop</code>") to the command line. It works. </p>
  
  <p><strong>Update</strong></p>
  
  <p>It seems it works in powershell console. An ISE bug?</p>