shutdown
发布时间:2026-09-17 | 浏览:1
Access to this page requires authorization. You can try signing in or changing directories .
Access to this page requires authorization. You can try changing directories .
Applies to: ✅ Windows Server 2025 , ✅ Windows Server 2022 , ✅ Windows Server 2019 , ✅ Windows Server 2016 , ✅ Windows 11 , ✅ Windows 10 , ✅ Azure Local 2311.2 and later
Enables you to shut down or restart local or remote computers, one at a time.
P - Indicates that the restart or shutdown is planned.
U - Indicates that the reason is user-defined. If p or u aren't specified, the restart or shutdown is unplanned.
xx - Specifies the major reason number (a positive integer, less than 256).
yy Specifies the minor reason number (a positive integer, less than 65536).
Users must be assigned the Shut down the system user right to shut down a local or remotely administered computer that is using the shutdown command.
Users must be assigned the Shut down the system user right to shut down a local or remotely administered computer that is using the shutdown command.
Users must be members of the Administrators group to annotate an unexpected shutdown of a local or remotely administered computer. If the target computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. For more information, see: Default local groups Default groups
Users must be members of the Administrators group to annotate an unexpected shutdown of a local or remotely administered computer. If the target computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. For more information, see:
Default local groups
Default local groups
If you want to shut down more than one computer at a time, you can call shutdown for each computer by using a script, or you can use shutdown /i to display the Remote Shutdown box.
If you want to shut down more than one computer at a time, you can call shutdown for each computer by using a script, or you can use shutdown /i to display the Remote Shutdown box.
If you specify major and minor reason codes, you must first define these reason codes on each computer where you plan to use the reasons. If the reason codes aren't defined on the target computer, Shutdown Event Tracker can't log the correct reason text.
If you specify major and minor reason codes, you must first define these reason codes on each computer where you plan to use the reasons. If the reason codes aren't defined on the target computer, Shutdown Event Tracker can't log the correct reason text.
Remember to indicate that a shutdown is planned by using /d p|u:xx:yy , where xx and yy represent the major and minor reason codes. Not using the /d parameter might cause the shutdown to be logged without a specified reason. Using the /d parameter for an unplanned shutdown allows the shutdown to be logged correctly.
Remember to indicate that a shutdown is planned by using /d p|u:xx:yy , where xx and yy represent the major and minor reason codes. Not using the /d parameter might cause the shutdown to be logged without a specified reason. Using the /d parameter for an unplanned shutdown allows the shutdown to be logged correctly.
The shutdown or restart reasons uses the following legend:
E : Expected - An expected shutdown or restart that is planned and communicated in advance.
U : Unexpected - An unexpected shutdown or restart occurs where the system stops working due to an error, such as a system crash, power failure or other.
P : Planned - A planned shutdown or restart scheduled in advance, such as system maintenance, software installation or other.
C : Customer Defined - Specify a custom reason for the system shutdown or restart.
To force apps to close and to restart the local computer after a one-minute delay, with the reason Application: Maintenance (Planned) and the comment "Reconfiguring myapp.exe", type:
To perform a planned shutdown of a device in 10 minutes and capture the reason in the shutdown event tracker with the comment "Scheduled maintenance", type:
To restart the remote computer myremoteserver with the same parameters as the previous example, type:
To restart the remote computer myremoteserver in 5 minutes due to a security update and include a custom reason in the shutdown event tracker, type:
To cancel a pending shutdown (must be run in a new command prompt window during the timeout period), type:
Command-Line Syntax Key
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?
Additional resources
Last updated on 2025-05-02