I have a PowerShell script that I am debugging and would like to redirect all Write-Host statements to a file. Is there an easy way to do that?
I just added Start-Transcript at the top of the script and Stop-Transcript at the bottom.
The output file was intended to be named -.rtf, but for some reason the trace file was being put where I did not expect it — the desktop!
-.rtf