Udostępnij za pośrednictwem


Restart or shut down locally and document the reason

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To restart or shut down locally and document the reason

  • Using the Windows interface

  • Using a command line

Using the Windows interface

  1. Click Start, and then click Shut Down or Restart.

  2. Under What do you want the computer to do, click Restart or Shut down.

  3. If you did not anticipate having to restart or shut down the computer at this time, clear the Planned check box.

  4. Select the appropriate reason from the list.

  5. If a comment is required, the OK button will not function until you type at least one character in the text box.

Important

  • Do not turn off your computer until a message appears telling you that it is safe to do so. Windows Server 2003 family operating systems store important data in memory while the system is running and need to write the data to the hard disk before you turn off the computer. After the data is saved, the operating system notifies you that it is okay to turn off the computer.

Notes

  • To perform this procedure, you must have the user rights to shut down the local system. For a list of security groups that have this permission by default on computers running Windows Server 2003 family operating systems, see "Privileges" under Related Topics.

  • An alternative way to open the expected shutdown dialog box is to press CTRL+ALT+DELETE and then click Shut Down.

  • Shutdown Event Tracker records data only for the Restart and Shutdown options.

  • If the System State Data feature is enabled and you specify an unplanned reason for the restart or shutdown, a file containing relevant system data will be created in the %windir%\system32\LogFiles\Shutdown\ directory. The System State Data feature is enabled by default on all Windows Server 2003 family operating systems.

  • For information on defining custom reasons, see "Best practices" under Related Topics.

Using a command line

  1. Open Command Prompt.

  2. Type:

    shutdown /s /d 1:1 to initiate an unplanned shut down after a default wait period of 30 seconds, with the major reason, Hardware, and the minor reason, Maintenance.

    Or,

    Type:

    shutdown /r /t 60 /d p:4:2 to initiate a planned startup after waiting one minute, with the major reason, Application, and the minor reason, Installation.

    Or,

    Type:

    shutdown /p /d p:1:2 to turn off the power to your computer with no time-out period or warning and to indicate that the action was planned with the major reason Hardware and the minor reason Installation.

Value Description

/s

Shuts down the computer.

/r

Restarts the computer after shutdown.

/p

Turns off the local computer with no time-out period or warning. You can use /p only with /d. If your computer does not support power off functionality, it will shut down when you use /p, but the power to the computer will remain on.

/tnnn

Sets the wait period before a restart or shutdown to xxx seconds, causing a warning to display on the local console. You can specify from 0 through 600 seconds. If you omit /t, the wait period defaults to 30 seconds.

/d[p:]xx:yy

Lists the reason for the system restart, shutdown, or power off. The following rows describe the parameter values.

p:

Indicates that the restart or shutdown is planned. If you do not use the p: option, Shutdown Event Tracker assumes that the restart or shutdown is unplanned.

xx

Specifies the major reason number (0-255).

yy

Specifies the minor reason number (0-65535).

Notes

  • To perform this procedure, you must have the user rights to shut down the local system. For a list of security groups that have this permission by default on computers running Windows Server 2003 family operating systems, see "Privileges" under Related Topics.

  • For the complete command line syntax, see "Shutdown" under Related Topics, below.

  • If the System State Data feature is enabled and you specify an unplanned reason for the restart or shutdown, a file containing relevant system data will be created in the %windir%\system32\LogFiles\Shutdown\ directory. The System State Data feature is enabled by default on all Windows Server 2003 family operating systems.

  • For information on defining custom reasons, see "Best practices" under Related Topics.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also

Concepts

Restart or shut down remotely and document the reason
Shutdown
Shutdown Event Tracker Resources
Shutdown Event Tracker Best practices
Privileges