Shutdown and restart Windows 7 remote desktop with commands

Source: Internet
Author: User

Shutdown-s-t 0

Restart shutdown-r-t 0

 

Open the run box (WIN + r key) and enter the preceding command. The following number indicates the delay of shutdown/restart.

At shutdown-s enter this in the running state and press enter to shut down the system.

 

Usage: shutdown [-I |-L |-S |-r |-A] [-F] [-m \ computername] [-T XX] [-c "comment"] [-D up: XX: yy] No parameter to display this message (? Same)-I display GUI, must be the first option-l logout (cannot be used with option-m) -s disable this computer-r Disable and restart this computer-a discard system shutdown-m \ computername Remote Computer shutdown/restart/discard-t xx set the shutdown timeout to XX seconds- C "Don't open Bt. Thank you". Close the comment (up to 127 characters) -F: an application that runs forcibly Program Close without warning-d [p]: XX: Why YY is disabled Code U is the user code P is a planned close code XX is a major cause code (a positive integer smaller than 256) YY is a secondary cause code (a positive integer smaller than 65536)-f: forcibly close the application-m \ computer name: Control Remote Computer-I: displays the graphical user interface, but must be the first option of shutdown-L: deregister the current user-R: shutdown and restart-t time: Set shutdown countdown-c "message content": Enter the message content in the shutdown dialog box (cannot exceed 127 characters. 2. Example: shut down the computer shutdown-s (method: "Start"-> "run"-> "shutdown-s"-> "OK ") shutdown-S-T 3 (method: "Start"-> "run"-> "shutdown-S-T 3"-> "OK ") cancel shutdown-A (method: "Start"-> "run"-> "shutdown-a"-> "OK") 3. Application: (1) if you want to automatically shut down your computer one hour later For example, if you are downloading a software or movie and you are in urgent need of going to Lishui, what do you do? Stop download? It's a pity! Continue? How can I disable my computer after the download? Don't worry! You can use this command to solve the problem: shutdown-s-t 3600 (the system shuts down the computer after 3600 seconds, and the time is customized) You can safely go to Lishui, you don't have to worry that your computer has been on for a long time. (2) The Countdown function is automatically shut down due to the RPC vulnerability. Use this command to cancel the countdown function: shutdown-A (method: "Start"-> "run"-> "shutdown-a"-> "OK") (3) the shutdown command is used to achieve unified shutdown of the network. After work, many teachers usually turn off their computers. The leaders found that they asked to solve this problem. I thought it would take a long time to go to the offices to check whether all the machines could be turned off through a computer. Because Windows XP is installed on all office machines, you can use the "shutdown" command for remote shutdown. The procedure is as follows: Click Start> run in step 1, enter gpedit. MSC in the dialog box, and click OK to open the Group Policy Editor ". Step 2 open "Computer Configuration> Windows Settings> Security Settings> Local Policies> User Rights Assignment" on the left of the "Group Policy Editor" window ", in the window on the right, select Force shutdown from the remote system ". In the displayed dialog box, only members in the "Administrators" group have the right to remotely shut down the instance. Click the [add user or group] button at the bottom of the dialog box, in the displayed dialog box, enter "heyongsheng" (Administrator account) and click [OK]. Step 3 Add a "heyongsheng" user in the "Force Shutdown From Remote System" attribute, click [OK], and close the "Group Policy Editor" window. After performing the above operations on the computers in various offices, we granted the "heyongsheng" user of each computer the permission to remotely shut down the computer. When I get off work, I only need to perform the following operations on my machine: Step 4, click Start> run, and enter shutdown-I in the dialog box ", the "remote shutdown" dialog box is displayed (figure 1 ). Figure 1 remote host control window (4)shutshutshutshutshutshutshutshut, which is located in the windowssystem32 folder. If you want windows to be the same, copy shutdown.exe to the system directory system32. First, of course, the motherboard must support the software shutdown function, otherwise you have to manually press the power switch to shut down, the current motherboard generally supports software shutdown. Operation Procedure: Click Start, program, attachment, or system tool, and click schedule task. In the displayed schedule task window, double-click Add scheduled task to run the scheduled task wizard. Click Browse to find the rundll32.exe file in the Windows directory, click the "open" button. In the displayed dialog box, enter the name of the task (for example, "Timed Shutdown"), and select "Daily" as the execution method ", then, press "Next" to select the scheduled shutdown time (you can first try one minute later than the time displayed on the current machine), and then select "when you click Finish to open the Advanced properties of the task ", click "finish", right-click "Timed Shutdown" to open properties, enter "C: winntsystem32shutdown.exe-r-t 1" in the running column, and click "OK. 4. Conclusion: The shutdown command in Windows XP is very powerful. You can try it and find out the function to serve us.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.