I am trying to use the Write-Output command in Powershell to write a line to Netcat, but I cannot seem to do this without a new line being sent. So far I have tried...
Write-Output "command" | nc -w1 aa.bb.cc.dd xxxx
and
"command" | nc -w1 aa.bb.cc.dd xxxx
... however both cause new lines to be sent along with "command". Can someone help me find a solution that would be similar to Write-Host -NoNewLine or Echo -n in Linux?