echoWrite-OutputとWrite-Host
PS> function Receive-Output { process { Write-Host $_ -ForegroundColor Green } } PS> Write-Output "this is a test" | Receive-Output # "thie is a test" は緑で表示される PS> Write-Host "this is a test" | Receive-Output # "thie is a test" は白(デフォルト色)で表示される PS> Write-Output "this is a test" # "thie is a test" は白(デフォルト色)で表示される 参考http://windowsitpro.com/powershell/q-should-i-ever-use-write-host-powershell |
|