Shutdown your computer
Type
"shutdown -s" without the quotes in the command prompt and press Enter. Shutdown is the command being executed and the switch -s tells the computer to shutdown.
Restart your Computer
Type
"shutdown -r" in the command prompt and press Enter. In this case, the command switch -r is telling the computer to restart after shutdown.
Log Off the Current User
Type
"shutdown -l" in the command prompt and press Enter. The -l command switch tells the computer to log off.
Shutdown your computer after a specific time
Type "shutdown -s -t 60" to shutdown your computer after 60 seconds. Upon executing this, a countdown timer displaying a warning message will be shown. This command uses the -t command switch followed by a variable (which is 60 in this case) which represents the number of seconds after which the computer will shutdown.
Display a Message containing the reason for shutdown
Type shutdown -s -t 500 -c "I am tired. I don't want to work anymore." (with the quotes) in the Command Prompt and press Enter. The -c switch is used in the code to give the reason for shutting down and what is followed in quotes will be displayed in the dialog box as the reason. This can be used to display all sorts of funny messages.