Shutdown Command Parameters
PARAMETER | FUNCTION |
---|---|
-s | Shuts down the comptuer. |
-r | Reboots the computer. |
-f | Force-close all running applications. |
-m \\Computer | Specifies a specific computer on the network that you want to shut down or reboot. Absent this parameter, the command affects only the local PC on which it is run. |
-t xx | Sets a delay (xx seconds) before the specified operation commences. |
-c "message" | Add your own text inside the quotations to provide remote users with a message about why and when their PC will shut down or reboot. |
/a | Aborts a shutdown or restart if used during the (-t) delay period. |
/h | Hibernates the computer. |
/? | Displays the full help document with all commands. |
There are many more parameters and options for the shutdowncommand, most of which are only useful for those administering large networks. Small businesses and home users will primarily stick with the parameters above.
Shutdown Command Examples
To bring this all together, let’s go over a few examples. First, let’s say that you are connected to your office PC via Remote Desktop and you want to reboot it immediately. You know that no one else is using it and all of your documents and data are saved. While in the Remote Desktop session, launch Command Prompt on your office PC and type the following command:
shutdown -r -f -t 0
That command will reboot the computer (-r), force all applications to close so that one doesn’t get stuck and prevent the reboot from happening (-f), and it will happen immediately with a zero second delay (-t 0). In this case, we’re accessing the Command Prompt via Remote Desktop directly on the office PC, so we don’t need to specify the computer name with the -m parameter because we are, in effect, operating on the local machine, even though we’re not sitting in front of it.
อ้างอิง : http://www.tekrevue.com/tip/shut-down-and-reboot-remote-pc/