echo
Write-OutputとWrite-Host
Write-Outputはコマンドレットの結果をパイプラインに渡す。Wite-Hostはコマンドレットの結果をパイプラインに渡さない。
PS> function Receive-Output { process { Wite-Host $_ -ForegroundColor Green } } PS> Write-Output "this is a test" | Receive-Output PS> Write-Host "this is a test" | Receive-Output PS> Write-Output "this is a test"