<html>
<head>
<title>Remote Shutdown</title>
<LINK REL="stylesheet" TYPE="text/css" HREF="../css0.css">
</head>
<body>

<!--#include virtual="/doc/header.html" -->

<h1>Remote Shutdown</h1>
<h2>Introduction</h2>
<p>Windows NT/2K does not come with a built-in command-line shutdown command. However, both the Windows NT 4 and Windows 2000 Resource Kits come with shutdown, a program that you can use to shutdown local and remote computers. PsShutdown is a clone of the Resource Kit shutdown tool, providing you the same options and ability to shutdown, and optionally reboot, local and remote Windows NT/2K systems.</p>

<h2>Installation</h2>
<ol>
<li>Download PsTools or PsShutdown from <a href="http://www.sysinternals.com/ntw2k/freeware/pstools.shtml" target="_blank">http://www.sysinternals.com/ntw2k/freeware/pstools.shtml</a> or download from <a href="http://www.grape-info.com/doc/win2000srv/power/Pstools.zip">this site</a>.<br>Notice: The new PsShudown changed its parameters, and the example on this sites does not work as it is. In such case, use the copy on this site, or change the parameter accordingly.

<li>Just copy PsShutdown onto your executable path, and type psshutdown with command-line options defined below.</p>
</ol>

<h2>Usage</h2>
<p>You can use PsShutdown to initiate a shutdown of the local or a remote computer, or to abort an imiment shutdown. If you use PsShutdown to perform a shutdown you must explicitly specify either the local system (with the -l switch) or a remote computer (by listing its name), but if you want to abort a shutdown PsShutdown assumes that you want to abort a shutdown of the local system unless you specify a remote computer name.</p>

<b>usage: psshutdown [-?] [-t nn] [-m "message"] [-f] [-r] [-a] [-l | \\computer]</b>

<table border='1' cellspacing='0' cellpadding='0'>
<tr><td>-?<td>Displays the supported options. 
<tr><td>-t<td>Specifies the countdown in seconds until the shutdown (default: 20 seconds) 
<tr><td>-m<td>This option lets you specify a message to display to logged-on users when a shutdown countdown commences 
<tr><td>-f<td>Forces all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data 
<tr><td>-r<td>Reboot after shutdown 
<tr><td>-a<td>Aborts a shutdown (only possible while a countdown is in progress) 
<tr><td>-l<td>Shutdown the local system. You must specify this switch so that you don't inadvertently shutdown a computer by running PsShutdown without any parameters in the expectation that it will display its command-line options. 
<tr><td>\\computer<td>Shutdown the computer specified 
</table>

<h2>Example</h2>
If you want to shutdown several servers, you can make a batch file like below.
<li>allshutdown.bat</li><br>
<pre>
psshutdown.exe \\server1 -t 10 -f
psshutdown.exe \\server2 -t 10 -f
psshutdown.exe \\server3 -t 10 -f
psshutdown.exe \\server4 -t 10 -f
</pre>

If you logined by different user, you specify,
<pre>
psshutdown.exe \\server1 -t 10 -f -u Administrator -p <i>password</i>
psshutdown.exe \\server2 -t 10 -f -u Administrator -p <i>password</i>
psshutdown.exe \\server3 -t 10 -f -u Administrator -p <i>password</i>
psshutdown.exe \\server4 -t 10 -f -u Administrator -p <i>password</i>
</pre>


<hr><a href="../index.html">Back</a> - <a href="../../support.html">Support</a>

<!--#include virtual="/doc/footer.html" -->

</body>
</html>
