Sunday, 30 August 2015

Shutdown your computer with CMD

Most of us shutdown our computers using the power button given in the Start menu. Some of us use the physical power button on our machines. Very few people actually use other means of shutting down a computer and even less is the number of people who use the command prompt to shutdown a computer.

A reason for this is that most of us don't know that the command prompt can be used to not only shutdown, restart or log off our computer instantly but also to shutdown a remote computer provided you have administrative access. It can also be used to hibernate a computer and give a comment containing the reason for shutdown. This post will show you how to do all this.


Shutdown computer with command promptRequired

A computer running Windows (XP, Vista, 7, 8 or 8.1) with the command prompt working perfectly, i.e. not disabled by a virus.

Initial Steps
1) Press Windows Key + R.
2) Enter CMD and press Enter.


This will start the command prompt. Follow the instructions below depending on what you want to do.

Shutdown Local Machine (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 Local 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.

No comments: