Avoiding newline in write-output

powershell

Solution

Found somewhere on the Internet:

Write-Output "Server: $($a)"

Works great in my code.

Problem

I want to collect all output from my script in a log file and must use write-output instaed of write-host. `Write-Output "Server:" $a` looks like `Server: foo`. Do I really have to write to write `write-output $("sfdghk:" + $a)` to get `Server:Foo` Thanks -jt

Original source

Related problems