title: powershell out-file how to rid of extra spaces on each line
body: <p>I run this command and I get all computer hostnames in the names.txt file.
  Each hostname in the file is on a separate line, but every hostname is followed with white spaces which cause an issue when I try to read this file. How can I output to this file without getting the white spaces on each line?</p>
  
  <pre><code>Get-ADComputer -Filter * | Select-Object -property name | Sort-Object -Property name | out-file -filepath C:\temp\names.txt  
  </code></pre>