@echo off echo "All output (stdout and stderror) will be redirected to output.txt" powercfg /a > output.txt 2>&1