Search This Blog

Write-Output

Output


PS> "f"
f
PS> Write-Output "f"
f
PS> Write-Output "f","h"
f
h
PS> Write-Output "f","h",""
f
h

PS> Write-Output "f","h","" | % {$_ -ne $null}
True
True
True
PS> Write-Output "f","h","" | % {$_ -ne ""}
True
True
False
PS> Write-Output "f","h","" | ? {$_ -ne ""}
f
h
PS>

Memo

変数のみで出力されるのは、既定でこれが働くおかげらしい。


reference

Write Output