How can I redirect PowerShell output when run from Task Scheduler?

前端 未结 9 955
我在风中等你
我在风中等你 2020-12-13 12:35

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

9条回答
  •  抹茶落季
    2020-12-13 13:00

    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
    

提交回复
热议问题