I read everywhere (i.e. Redirect Write-Host statements to file) that Write-Host
cannot be redirected to file. But
Given t.ps1
file:
function Log(){
Write-Host "host msg"
}
Log
I see "host msg" in file:
PS D:\> & ./t.ps1 *>> .\out.log
PS D:\> gc .\out.log
host msg