Output file doesn’t match Write-Host
Caveat: Write-Host is meant for to-display output, not for outputting data – it bypasses PowerShell’s success output stream (PowerShell’s stdout equivalent), so that output from Write-Host cannot (directly[1]) be captured in a variable, nor redirected to file – see the bottom half of this answer for more information. Use Write-Output or – preferably – PowerShell’s … Read more