how to shutdown windows from command prompt code example
Example 1: cmd shutdown
# Schedule an automatic shutdown (7200 = seconds)
shutdown /s /t 7200
# Cancel Auto Shutdown Schedule
shutdown -a
Example 2: restart windows from cmd
shutdown /r
Example 3: how to power down pc using cmd
shutdown /s