title: Prevent trailing newline in PowerShell Out-File command
body: <p>How do I prevent PowerShell's <a href="https://msdn.microsoft.com/powershell/reference/5.1/microsoft.powershell.utility/Out-File" rel="noreferrer">Out-File</a> command from appending a newline after the text it outputs?</p>
  
  <p>For example, running the following command produces a file with contents "TestTest\r\n" rather than just "TestTest".</p>
  
  <pre><code>"TestTest" | Out-File -encoding ascii test.txt
  </code></pre>