Windows Command shutdonwn

Source: Internet
Author: User

Take a detailed look at the usage of c to achieve this, without the need for at commands
For example: shutdonwn-s-t 3600
Shutdown in 1 hour
Note: The shutdown command at 2000 is invalid.
========================================================== ======================================
Shutdown allows you to shut down or restart a local or remote computer. If no parameter is used, shutdown logs out of the current user.
Syntax
Shutdown [{-l |-s |-r |-a}] [-f] [-m [\ ComputerName] [-t xx] [-c "message"] [-d [u] [p]: xx: yy]
Parameters
-L
Log out of the current user. This is the default setting. -M ComputerName is preferred.
-S
Disable the local computer.
-R
Shut down and restart.
-
Stop and close. Except-l and ComputerName, other parameters are ignored. During the timeout period, you can only use-.
-F
Forcibly run the application to be closed.
-M [\ ComputerName]
Specify the computer to close.
-T xx
Set the timer used for system shutdown to xx seconds. The default value is 20 seconds.
-C "message"
Specify the message that will be displayed in the message area in the system close window. It can contain up to 127 characters. The quotation marks must contain messages.
-D [u] [p]: xx: yy
Lists the cause code for system shutdown. The following table lists different values. Value description
U specifies the user code.
P specifies the planned code to close.
Xx specifies the main cause code (0-255 ).
Yy specifies the secondary cause code (0-65536 ).
/?
Display help at the command prompt.
Note
Once the primary and secondary cause code is specified, you must first define the cause code for each computer that plans to use a specific cause. If no cause code is defined on the target machine, the event viewer cannot record the correct cause text.
Example
To disable \ MyServer within 60 seconds, forcibly run the application to be closed, restart the system after shutdown, specify a user code, and specify the plan to shut down the system, then record the primary cause code 125 and secondary cause code 1. Type:
Shutdown-r-f-m \ MyServer-t 60-d up: 125: 1
Format legend
Format description
Information required by italic users
You must enter the elements exactly as shown in bold.
The ellipsis (...) can be repeated multiple times in the command line.
Optional items between brackets ([])
The options are separated by vertical bars (|) between braces. For example, the {even | odd} user must select a quota group with only one option.
Courier font code or program output

Related Article

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.