I can write output from Powershell with the following script:
Write-Host "Hello", "1234"
Write-Output "Hello", "2345"
The output from this program is:
Hello 1234
Hello
2345
So, the Write-Host with a comma separated list puts a space between the items. The Write-Output puts a newline between them. There are lots of differences between the 5 different Write-xxxxxxx statements, but why in the world would the output differ between these 2 statements and how can change Write-Output to act like Write-Host?
WTF Microsoft?
Write-Hostbreaks the pipeline so you shouldn't use it to process data. It writes directly to the console.Write-Hostand mentions some alternatives: jsnover.com/blog/2013/12/07/write-host-considered-harmful