Skip to main content

Shutdown Your Computer or a Remote PC via Command Prompt

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, 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. 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. Hibernate a Local Computer Type in "Rundll32.exe Powrprof.dll,SetSuspendState" without the quotes and press Enter. Your computer should hibernate, if it does not, then you must enable hibernation to do this. Shutdown your or a remote 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. One example :- Skynet has become self aware. John Connor did not stop me. You can not use your PC anymore. Stop a System Shutdown Type "shutdown -a" and press Enter. This will stop the system from shutting down if the countdown to shut down has not reached 0.

Comments

Popular posts from this blog

File attributes and NTFS permissions

Chapter 5 - File attributes and NTFS permissions   We’ve already mentioned both file attributes and NTFS permissions throughout this book. In this chapter we’ll take a closer look at file attributes, and discuss how to view and change attributes from the command line. We’ll also examine NTFS permissions, which are considerably more powerful than file attributes, and discuss how to view and alter them as well.   WHAT ARE FILE ATTRIBUTES?   “File attributes” are basically pieces of metadata that contain additional information about the file. In Windows, files generally have their names, their types (defined by the file’s extension), and their timestamps. (Certain kinds of files, such as MP3 music files, have additional kinds of metadata, such as the album and artist name.) With file attributes, however, there are four additional pieces of information that you can add to a file.  These four pieces of information are: -Archive,...

Methods used for the calculation of areas in Surveying

Methods used for the calculation of areas in Surveying: Simpson’s rule Trapezoidal rule Graphical rule Simpson’s Rule Statement It states that, sum of first and last ordinates has to be done. Add twice the sum of remaining odd ordinates and four times the sum of remaining even ordinates. Multiply to this total sum by 1/3 rd of the common distance between the ordinates which gives the required area. Where O 1 , O 2 , O 3 , …. O n are the lengths of the ordinates x = common distance n = number of divisions Note: This rule is applicable only if ordinates are odd, i.e. even number of divisions. If the number of ordinates are even, the area of last division maybe calculated separated and added to the result obtained by applying Simpson’s rule to two remaining ordinates. Even if first or last ordinate happens to be zero, they are not to be omitted from Simpson’s rule. The following offsets are taken from a chain line to an irregular boundary toward...

About creating partition

About creating partition To create partition is actually to partition hard drive. Only after you creating partition(s) on a disk, can you make use of the disk to save all kinds of data. All physical parameter of a disk are set when you create partition(s) on it, including MBR (Main Boot Record) and the destination for storing boot record backup. For other information later needed for the management of file system and other operating systems, it will be achieved by later advanced format. What are the advantages of creating partitions? Generally speaking, creating more than one partition enables you to have operating system separate from data, deploy multi-boot setups, and keep frequently used programs and data near each other. Therefore, you can manage your computer with ease. If there is only one partition (namely C drive) on disk: When recovering the system, the whole c disk (the system disk) will be formatted. If all data are saved in c disk, they will all be wiped a...