powershell output error information to a file

 

myjob.bat 2>&1 >> C:\MyLog.txt

 

myjob.bat 2>&1 | Out-File C:\MyLog.txt -Append
Published 136 original articles · won praise 71 · views 160 000 +

Guess you like

Origin blog.csdn.net/u012308586/article/details/104814947