I am trying to figure out how to eliminate line breaks when using add-content
echo $server \"Uptime: \" $uptime.days \", Days\" $uptime.hours \", Hours\" $up
The simplest way to sidestep any problem PowerShell might be putting into the line breaks would be to avoid using the providers.
By using [IO.File]::WriteAllText to write the file, you should be able to avoid the linebreaks that come from PowerShell. The only caveat is that [IO.File]::WriteAllText doesn't understand PowerShell paths, so you'll need to pass it an absolute path.
Hope this helps,