I have the below code that goes through and gets scheduled tasks info and puts the output that occurs on the screen to a log file.
However, what I have noticed is t
Ahh, the correct answer should be:
$Command = "schtasks.exe /query /S $name /fo CSV /v 2>&1 >$scheduledpath\$name.csv"
I.e. pipe stderror (pipe 2) to stdout (pipe 1), so that both shows in the stdout.