title: Powershell add-content line breaks
body: <p>I am trying to figure out how to eliminate line breaks when using add-content</p>
  
  <pre><code>echo $server "Uptime: " $uptime.days ", Days" $uptime.hours ", Hours" $uptime.minutes ", Minutes" | add-content $output_file
  </code></pre>
  
  <p>Basically I have been trying to get the uptime of a server to go to a text file, and when I do this the output comes out </p>
  
  <pre><code>HOSTNAME
  Uptime:
  , 2 Days
  2 
  , Hours
  15
  , Minutes
  </code></pre>
  
  <p>I looked at this question: <a href="https://stackoverflow.com/questions/2726599/powershell-replace-lose-line-breaks">Powershell replace lose line breaks</a></p>
  
  <p>Also I went from using out-file -append to add-content, however both produce similar results, can someone shed to some light on how I can eliminate the breaks?</p>