Shutdown and restart/reboot Windows from the command line.

:: To shutdown the current machine:
shutdown /s

:: To shutdown the current machine force-closing all apps:
shutdown /s /f

:: To restart the current machine:
shutdown /r

:: To hibernate the current machine:
shutdown /h

:: To log off the current machine:
shutdown /l

:: To specify a timeout in seconds to wait before shutting down:
shutdown /s /t <seconds>

:: To specify a comment for the shutdown reason:
shutdown /s /c "<reason>"

:: To abort a shutdown sequence whose timeout is yet to expire:
shutdown /a

:: To shutdown a remote machine:
shutdown /m <\\hostname>