Category: PoshBytes

PoshBytes

PoshBytes: Write-Host vs Write-Output

Write-Host vs Write-Output: What’s the Difference? In PowerShell, Write-Host and Write-Output are often mistaken for interchangeable commands.  This post is a companion for the video embedded below. Scroll down to see the code from the video. Side-by-Side Comparison Write-Host "Hello from Write-Host" Write-Output "Hello from Write-Output" At first glance, they both display text to the screen. However: Write-Host sends output directly...