Windows shutdown commands

Source: Internet
Author: User

Specifies that the system automatically shuts down after 22 minutes: Click "Start → run" and enter the command in "open" Shutdown
-S-T 1320 "(Note: quotation marks are not entered, there are spaces between parameters, 1320 in seconds), click OK
button.

Specifies that the system automatically shuts down at a certain time (for example, 12:00): Enter a command in open
"At Shutdown-s". Shutdown-i can bring up the shutdown graphical interaction page

Shutdown commands are easy to search, but the cancellation of a timed shutdown or restart command shutdown is sometimes not good, and here's my experience.

Method/Step 
  1. The detailed use of the shutdown command, used by shutdown, can skip this step.

    Start command line: Win+r shortcut start run (or run in the Win Key Start menu), enter the cmd command, return. You want to use Administrator mode.

    View shutdown detailed usage: command line input Shutdown.exe or shutdown/?, enter, see

    Usage: Shutdown.exe [/I |/L |/s |/r |/g |/a |/p |/h |/E] [/f]

    [/M \\computer] [/t XXX] [/d [P|U:]XX:YY [/C] comment "]

    Common:

    /I displays the graphical user interface (GUI).

    This must be the first option.

    /s shuts down the computer.

    /R shut down and restart the computer.

    /A aborts the system shutdown.

    This can only be used during the timeout period.

    The/t XXX setting expires before the timeout is xxx seconds.

    The valid range is 0-315360000 (10) and the default value is 30.

    If the timeout period is greater than 0, the/F

    Parameters.

    Symbol [A | B [C]] [d]:[] indicates optional, nested sub-optional, | Yes or.

    If you are not accustomed to, you can use-i-l-s-r-A, etc., can also be executed

  2. Set up Scheduled tasks:

    Delay 300s shutdown: SHUTDOWN/S/t 300

    (You can also shutdown-s-T 300, the following standard/format to avoid Chinese characters)

    Every day 123456 restarts at 05:59 (24-hour system):

    At 05:59/every:su,m,t,w,th,f,sa shutdown/r/f/t 0

    Note: the/T 0 is actually executed immediately; at command can also cmd into the command line, hit at/? Enter

    Usage:

    The AT command schedules commands and programs to run on a specific date and time.

    at [\\computername] [[ID] [/delete] |/delete [/YES]]

    at [\\computername] time [/interactive]

    [/every:date[,...] |/next:date[,...]] "Command"

    Common:

    ID is assigned to the identification number of the scheduled command.

    /delete deletes a scheduled command. If ID is omitted, at Id/delete

    All scheduled commands on the computer will be deleted.

    TIME specifies when the command is run.

    /every:date[,...] Specifies that the command is run on a specific day of the week or month.

    If the date is omitted, the default is the monthly

    Run this day.

    /next:date[,...] Specifies the next specified date (for example, next Thursday) to be shipped

    Line command. If the date is omitted, the default is in each

    The day of the month runs.

    "Command" ready to run Windows NT command or batch

    Program.

  3. 3

    To view scheduled tasks:

    Note: The shutdown command is interactive, does not create a scheduled task item, is not found in the scheduled task, and only uses the AT command to generate the scheduled task.

    A Planning Task GUI interface method

    Control Panel (Small icon display, Administrative Tools, Task Scheduler, right) Task Scheduler library, you can see that the second at command is there, and the shutdown command does not.

    B of course I know. The second one belongs to the AT command, or it can be used on the command line:

    Run, CMD, at

    You can see that if you do not write the ID at the beginning, the ID will be assigned by default from 1 (even if you enter the AT command, the result ID is 1)

  4. 4

    A you can tell by step 3 that there are two ways to cancel the AT command:

    The first is to right-click the delete in the Task Scheduler library and Refresh to see the results

    The second is to use the command line input at 1/delete confirmation (1 is the ID number), enter at can see has been canceled

    B and the cancellation of the shutdown command is still in operation or command line with shutdown command

    shutdown/a

    There will be a notification (if the shutdown and AT commands are enabled, this can only cancel the Shutdown delay task, at the task of course to the AT command, that is, after this command hit, and then input at the command line at the query will find that there are still scheduled tasks, so if you do not close at the command will have a while hit/ A's command is still off)

    !!! If the notice is turned off, how do you know shutdown have canceled success?

    At the moment I only find a way to query events:

    Control Panel (small icon display), management tools, Event Viewer, Windows Log/System, the main window is sorted by date and time, the most recent and source of USER32 is its record, can be judged by time to have no cancellation, The number of times difficult to copy into other text editor to sort or reboot and then set it up.

    END
Precautions
    • Run or command line is best run as Administrator
Exchange of relevant experience
    • Win7 shutdown command and AT commands to combine scheduled tasks shutdown 02013.11.04
    • Remotely shutdown and restart your PC using the shutdown command 12016.03.25
    • Use the command prompt shutdown to resolve the fast shutdown or restart 02016.08.02
    • Power off command shutdown tips for using 2014.03.07
    • Win7 automatic shutdown command How to set and cancel the 2014.05.05]

Windows shutdown commands

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.