Como posso obter isso ( shutdown ) para redirecionar os comandos bem-sucedidos e com falha para o meu arquivo?
Use o seguinte comando:
shutdown.exe -r -t 50000 -m \top34.top.local > c:\output.txt 2>&1
Observe que 2>&1 deve ser após o primeiro > de redirecionamento.
Duplicating handles
The
&redirection operator duplicates output or input from one specified handle to another specified handle. For example, to senddiroutput to File.txt and send the error output toFile.txt, type:dir > c:\file.txt 2>&1
Fonte Usando operadores de redirecionamento de comandos