title: powershell batch pipe
body: <p>The following line works fine in powershell 2.0.</p>
  
  <pre><code>servermanagercmd.exe -query | Select-String "Application Server" -Context 0,13
  </code></pre>
  
  <p>But when I incorporate it into my batch file it only attempts to run the first part and then returns an error when it gets to Select-String. Does anyone know how to make sure that it reads the whole line? I tried the ^ before my pipe, but it still won't recognize the full line.</p>