Shutdown Your Computer or a Remote PC using 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.
Required
A computer running Windows (XP, Vista, 7 or 8) 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.
Shutdown a Remote Computer
Type "shutdown -s -m \\name of the computer" in the command prompt and press Enter. Replace \\name of the computer with the actual name of the remote computer you are trying to shutdown. As mentioned earlier, you must have administrative access to the computer you are trying to shutdown. To know if you have administrative access, press Windows key + R and then type the name of the computer and press Enter.
Note: If you don't remember the name of the remote computer, you can look for it by opening a list of all the computers you are connected to by executing "net view" in command prompt.
If you can connect to the computer, you will be asked to login with your username and password. Upon entering them, a window will display the list of all the directories available to you. This should help you know whether you can or cannot shutdown the remote 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.
A computer running Windows (XP, Vista, 7 or 8) 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.
Shutdown a Remote Computer
Type "shutdown -s -m \\name of the computer" in the command prompt and press Enter. Replace \\name of the computer with the actual name of the remote computer you are trying to shutdown. As mentioned earlier, you must have administrative access to the computer you are trying to shutdown. To know if you have administrative access, press Windows key + R and then type the name of the computer and press Enter.
Note: If you don't remember the name of the remote computer, you can look for it by opening a list of all the computers you are connected to by executing "net view" in command prompt.
If you can connect to the computer, you will be asked to login with your username and password. Upon entering them, a window will display the list of all the directories available to you. This should help you know whether you can or cannot shutdown the remote computer.
Copyright:http://www.tweakandtrick.com
No comments:
Post a Comment