180 pts.
 Batch file for remote shutdown of Windows Server 2003
Hi, I want to make a batch file and remotely shutdown a Windows 2003 Server. Is it possible?

Software/Hardware used:
ASKED: November 26, 2010  9:08 AM
UPDATED: May 7, 2013  5:58 PM

Answer Wiki:
It is possible remotely shutdown Server 2003. but before doing that, the computer configured correctly. Here are a couple of the most command to shutdown remotely: 1. -l: Logs off the computer 2. -s: Shuts down the computer 3. -r: Restarts the computer 4. -m \computername: remote shutdown of a computer 5. -f: Forces programs to close immediately and -t for time of interval Open a file in notepad with .bat extension and write like that: @echo off shutdown -m \<computername> -f (u may use ip address also) Or you may try this..... 1.Click Start>Run>Cmd 2. On comman d prompt, type: shutdown -i 3. There is a window called "Remote Shutdown Dialog" 4. Click Add and insert the computer name which you want to shutdown remotely 5. Now select Option and type a comment in "Comment" area Press Ok.
Last Wiki Answer Submitted:  May 7, 2013  5:58 pm  by  Michael Tidmarsh   14,060 pts.
All Answer Wiki Contributors:  Michael Tidmarsh   14,060 pts. , Subhendu Sen   22,125 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Hi Rechil,

I am getting the error access denied. I want to make a batch file in which I can feed the user name and password (Administrator of the remote server) so the user can also shutdown the server. Is there any possibility for a normal user to shutdown the server? I don’t want the user to RDP the server, just shut it down.

Thanks

 180 pts.

 

But you have to give proper permission to those users. Also is a good tool to shutdown remotely. It’s called “tunnilier”.

Thanks!

 22,125 pts.

 

You could use the Sysinternals’ PsExec tool to remotely execute the shutdown command with the ability to parameterize the machine to shutdown and the user and password.

A bat file with this code should do what you want:

echo off
set /p pc=Machine:
set /p user=User:
set /P pass=Password:
psexec \%pc% -u %User% -p %pass% shutdown -s -c "Some useful comment"
 63,580 pts.

 

The editor removed one slash from the last line.

This is the correct command (I hope):

psexec \\%pc% -u %User% -p %pass% shutdown -s -c "Some useful comment"
 63,580 pts.

 

open cmd prompt and type this

shutdown -m \put in computer name or IP address -f

this shuts down the computer
if you want to shut down the computer remotely and get it to reboot type in
shutdown -m \put in computer name or IP address -f -r -t 00

 805 pts.