/t:
xxx : Time until system shutdown in seconds.
The valid range is xxx=0-600 seconds. [default=30]
/c "
Msg" : An optional shutdown message [Max 127 chars]
/f : Force running applications to close.
This will not prompt
for File-Save in any open
applications.
so will result in a loss of all unsaved data!!!
/d u:
xx:yy : List a USER (unplanned)
reason code for the
shutdown.
/d P:
xx:yy : List a PLANNED reason code for the shutdown.
xx Specifies the major reason code (0-255)
yy Specifies the minor reason code (0-65536)
Options in
bold are for Windows 2003 and later
When using this
command to reboot a server, the shutdown process will normally allow 30
seconds to ensure each running service has time to stop. Services are shutdown in alphabetical
order. The shutdown may be done made faster if the services are first halted in a specific
order
using
NET STOP
or
SC
.
Examples
Shutdown the local system immediately:
SHUTDOWN /s
Restart the local system in 60 seconds time and specify the reason "Application: Installation
(Planned)" :
SHUTDOWN /r /t:60 /d P:4:2
Restart the remote system
server64
and specify the reason "Security Fix, Planned"
SHUTDOWN /r /m \\server64 /d P:2:17
“I shall go the way of the open sea, To the lands I knew before you came,
And the cool ocean breezes shall blow from me, The memory of your name” ~
Laurence Hope
SLEEP.exe
(
Resource Kit
)
Delay execution for a few seconds/minutes (for use within a batch file.)
Syntax
SLEEP
time
Key
time The
number of seconds to pause
For example:
To pause for an hour before running the next command in a batch file:
SLEEP 3600
Chia sẻ với bạn bè của bạn: