When running a simple PowerShell script from Task Scheduler, I would like to redirect the output to a file.
There is a long thread about this very topic here, yet i
The below sends verbose output to the screen as well as log it to a file.
something you're doing -Verbose 4>&1 | Tee-Object "C:\logs\verb.log" -Append