BASIC
In Windows, the shutdown command should be one of the most commonly used commands to shut down or restart a local or remote computer. Its basic usage is:
shutdown [/i | /l | /s | /sg | /r | /g | /a | /p | /h | /e | /o] [/hybrid] [/soft] [/fw] [/f] [/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
Of course, with so many parameters, the only ones that can be used on a daily basis are /s, /t, and /r. For example, I ask the local computer to log off and shut down after 3 minutes:
shutdown /s /t 180
The command is concise & nice. To cancel the automatic shutdown operation, all you need to do is:
shutdown /a
Meanwhile, /r means to restart PC.
PRO
The shutdown command parameter /c refers to the custom reason for the shutdown, for example:
shutdown /s /c "Security Update" /t 180
This means that your PC shuts down after 3 minutes for a security update.