the command to how to power off computer from DOS is this command you can use it also for rebooting

you can set the time also

try it

shutdown immediately
shutdown -t 1

shutdown -r reboots the computer

shutdown -s powers it off