Simple batch file to shutdown a machine on the network?

Soldato
Joined
1 Dec 2004
Posts
22,964
Location
S.Wales
Hi,

I have a server at home running Windows server 2003, at the moment if I want to shut it down it means I have to log on using Ultra VNC from my laptop and shut it down, now this is not too bad, but when its late and you want to goto sleep I want to be able to run a simple batch file which will shut down the server with a single click of a button ;)

Anyone got any quick ideas on how this is done? Just about to have a look on google myself. But I thought I would post it here aswel as others might want to know about this.

Thank you please :)

P.S I would like the batch file to be able to be run in a local environment (for when im on my LAN at home) and also over a WAN link for when im sitting at work (so it must use its LAN IP 192.168.0.5, and its WAN 92.x.x.x)

Thanks
 
Last edited:
I never found an answer to this, but what I did was login in via Remote Desktop and shutdown the pc manually. However that pc was running Windows XP.
 
Iv tried several batch files, none of them seem to be working :( Only thing I can find at the moment are third party applications. Oh well, the search continues....

Maybe VB Script??
 
Remember the server would need to be listening for a shutdown command, so unless you wrote a program that would do that...
 
Found a batch file which is working :)

shutdown /s /m \\192.168.0.5

Shuts down my server in a set time from the LAN on my Windows 7 Laptop, time to work on this I think
 
Found a batch file which is working :)

shutdown /s /m \\192.168.0.5

Shuts down my server in a set time from the LAN on my Windows 7 Laptop, time to work on this I think

To use this from the WAN you'd need to to access the LAN via VPN.

Another approach that isn't too tricky would be creating a web page on the server that calls a local batch file that performs a shutdown. Then you could shutdown your server from anywhere with an internet connection... even your mobile phone.

Few results on google for "asp.net shutdown".
 
To use this from the WAN you'd need to to access the LAN via VPN.

Another approach that isn't too tricky would be creating a web page on the server that calls a local batch file that performs a shutdown. Then you could shutdown your server from anywhere with an internet connection... even your mobile phone.

Few results on google for "asp.net shutdown".

Thanks for this :) I will certainly be looking in to this!
 
Back
Top Bottom