Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing Windows 2003 Server to hibernate from the command line

Status
Not open for further replies.

Vic88

MIS
May 29, 2000
76
JM
Hello all

I am able to force a windows 2000 server to hibernate, from the command line, by issuing the command.

RUNDLL32 PowrProf.dll, SetSuspendState

Can someone advise me of the command that will achieve the same result in windows 2003

Thanks, in advance, for the answer.


Vic88
 
Syntax
shutdown [/i | /l | /s | /r | /a | /p | /h | /e] [/f] [/m \\ComputerName] [/t XXX] [/d [p:] XX:YY/c"Comment"]

Parameters
/i
Displays the Remote Shutdown Dialog box. The /i option must be the first parameter you type, and all those following it will be ignored.
/l
Logs off the current user immediately, with no time-out period. You cannot use /l with /m \\ComputerName or /t.
/s
Shuts down the computer.
/r
Restarts the computer after shutdown.
/a
Cancels a shutdown, effective only during the time-out period. You may use a only with /m \\ComputerName.
/p
Turns off the local computer only (not a remote 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.
/h
Puts the local computer into hibernation, assuming that hibernation is enabled. You can use h only with /f.

/e
Enables you to document the reason for the unexpected shutdown on the target computer.
/f
Forces running applications to close without warning users in advance.CautionUsing the /f option might result in loss of unsaved data.
/m \\ComputerName
Specifies the target computer. Cannot be used with the /l option.
/tXXX
Sets the time-out period or delay before a restart or shutdown to XXX seconds, causing a warning to display on the local console. You can specify 0-600 seconds. If you omit /t, the time-out period defaults to 30 seconds.
/d [p:]XX:YY
Lists the reason for the system restart, shutdown, or power off. The following table describes the parameter values.ValueDescriptionp: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.XXSpecifies the major reason number (0-255).YYSpecifies the minor reason number (0-65535).
/c"Comment"
Enables you to comment in detail about the reason for the shutdown. You must first provide a reason using the /d option. You must enclose comments in quotation marks. You can use a maximum of 511 characters.
/?
Displays help, including a list of the major and minor reasons that are defined on your local computer, at the command prompt. Simply typing shutdown with no parameters also displays help.

Remarks
• Users must be granted the Shut down the system user right to shut down either a local or remotely administered computer using the shutdown command. For more information, see "Access control overview" and "Privileges" in Related Topics.

• Users must be members of the Administrators group to annotate an unexpected shutdown of either a local 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 and Default groups.

• If you want to shut down more than one computer at a time, you can call shutdown for each computer using a script, or you can use shutdown /i to display the remote shutdown dialog box.

• If you specify a major and minor reason code, you must first define these reason codes on each computer for which you plan to use the particular reason. If the reason codes are not defined on the target computer, Shutdown Event Tracker cannot log the correct reason text.

• Remember to indicate that a shutdown is planned by using the p: parameter. Omitting p: indicates that a shutdown is unplanned. If you type p: followed by the reason code for an unplanned shutdown, the command will not carry out the shutdown. Conversely, if you omit p: and type in the reason code for a planned shutdown, the command will not carry out the shutdown.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top