954,141 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to shutdown remote pc from DOS?

I am supporting application and sometimes I have to remotely shutdown users pc and I know there is a dos script file when execute will prompt user saying "your computer will be shut down in 2 minutes, please save all the work". Could any one please help. Thank you.

kartik
Newbie Poster
2 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

Hello,

Really depends on what OS your end users are working with on their computers. Windows 2003 Server, for example, has a shutdown command, that you can place a timer on and, work with. I don't think it has a place for a message, as interactive logins are not common on servers, unless you are running Terminal Services / Citrix. If you are running those applications, then you can message others using management tools contained within.

Looking at the problem from a network administration viewpoint, however, I do not like the idea of someone in another room just triggering a shutdown on me. I could be on a call supporting a customer, or I could be in a meeting and unable to save my data. Then again, you may have to decide to "amputate" that one user for the benifit of the greater good. If this becomes habit, you have other problems!

There is also a way to use the shutdown command across a network

shutdown /i

from a 2003 Server will give you a dialog box where you can add computers, give the users a warning of what you are up to. You would not be able to script this.

There is also

shutdown /r /m \\computername /t seconds /f {force shutdown, no warning}

If I were you, I would consider a remote control tool, such as VNC, that you can remotely trigger the service, and then login to the computer and see what the user is doing. Better manners suggest that you email or schedule the downtime, so that your users can plan for the event.

Christian

kc0arf
Posting Virtuoso
Team Colleague
1,937 posts since Mar 2004
Reputation Points: 121
Solved Threads: 57
 

Thank you.

kartik
Newbie Poster
2 posts since Jan 2005
Reputation Points: 10
Solved Threads: 0
 

in windows 2000 you can shutdown, restart computers on a network with right click on my computer and select manage,then right click on computer management,and then click connect to another computer, choose which computer from the list, select it and then right click on computer management again choose properties click on the advanced tab click on startup and recovery, click on shutdown you can choose different options. in there.

dvr
Junior Poster
199 posts since Sep 2003
Reputation Points: 10
Solved Threads: 4
 

hey anyone online????

pramod123
Newbie Poster
1 post since Aug 2007
Reputation Points: 10
Solved Threads: 1
 

if you access to that computer:
run command, type shutdown -m -s \\remote computer name

thats all

fzafarani
Light Poster
33 posts since Aug 2007
Reputation Points: 10
Solved Threads: 1
 

On complex networks where is used different Windows version it can be used third party software with client-server architecture like RSHUT Pro ( www.rshut.com ).

al_v
Newbie Poster
Banned
1 post since Nov 2007
Reputation Points: 10
Solved Threads: 1
 

Try this VBScipt. Copy and paste the below text in to notepad. then save it with the extension .vbs. Then when you double click it, it should give you an input box. What ever IP or PC name you enter there will be shut down!:

Sub RebootComputer( strServer )
Set objOSSet = GetObject("winmgmts:{(RemoteShutdown)}//" & strServer & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")

For each objOS in objOSSet
objOS.Reboot()
Next
End Sub


' *************************************************************
' Main
' **************************************************************
Dim strComputer
Do
strComputer = inputbox( "Please enter the name of the computer you want to reboot", "Input" )
Loop until strComputer <> ""

RebootComputer( strComputer )

WScript.Echo( "Computer " & strComputer & " rebooted" )

BPembo
Newbie Poster
5 posts since Nov 2007
Reputation Points: 10
Solved Threads: 1
 

basically the previous replies are correct in saying you just type "shutdown -i". But if you want to be able to stop the shutdown process when someone trys to do it to you, you just type in shutdown -a, and that'll stop the process. Hope i helped a little.

amazingnessn
Newbie Poster
1 post since Dec 2007
Reputation Points: 10
Solved Threads: 1
 

psexec and company :)

DimaYasny
Posting Virtuoso
Moderator
1,777 posts since Jan 2007
Reputation Points: 183
Solved Threads: 89
 

It has been brought to my attention that there is an error in teh programming for my previous post. This version seems to work a bit better:


Dim objShell, strComputer, strInput
Dim strShutdown

Do
strComputer = (InputBox(" ComputerName to shutdown", "Computer Name"))
If strComputer <> "" Then
strInput = True
End if
Loop until strInput = True

strShutdown = "shutdown -r -t 0 -f -m \\" & strComputer

set objShell = CreateObject("WScript.Shell")

objShell.Run strShutdown

Wscript.Quit

thanks,
Brandon

Try this VBScipt. Copy and paste the below text in to notepad. then save it with the extension .vbs. Then when you double click it, it should give you an input box. What ever IP or PC name you enter there will be shut down!:

Sub RebootComputer( strServer ) Set objOSSet = GetObject("winmgmts:{(RemoteShutdown)}//" & strServer & "/root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")

For each objOS in objOSSet objOS.Reboot() Next End Sub

' ************************************************************* ' Main ' ************************************************************** Dim strComputer Do strComputer = inputbox( "Please enter the name of the computer you want to reboot", "Input" ) Loop until strComputer <> ""

RebootComputer( strComputer )

WScript.Echo( "Computer " & strComputer & " rebooted" )

BPembo
Newbie Poster
5 posts since Nov 2007
Reputation Points: 10
Solved Threads: 1
 

which OS U R using.

for windows xp/2000/2k3 it worked

shutdown /s /m \\ /t : it should be in seconds. For example 2 min = 120
: target system ip address

for any quries pls reply to : [email]downloadsrk@yahoo.com[/email]

downloadsrk
Newbie Poster
1 post since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

There are others ways to make easier remote shutdown in a machine network, follow this link to download Easy Net Control a network administrator tool that help you to easy shutdown, logoff, restart send messages, and instructions to remote machines.

http://enc.idraconnectivesolutions.com/
http://enc.idraconnectivesolutions.com/

Or

http://idraconnectivesolutions.com/enc/
http://idraconnectivesolutions.com/enc/

I hope that this could help you.

NetworkExpert
Newbie Poster
2 posts since Nov 2008
Reputation Points: 8
Solved Threads: 0
 

Now great tool available in xp and server

this is "Shutdown -i

you can type in run and press ok

jst watch new windows screen

than added target pc ip address and click add

remove warn check box

and jst click to okay....with enter commant..like any think whick you want to show target on their windows......


jst okay and watch ...target face


use also monitoring command .....like netstat and ping target ip


ping -t gone means ....Target system is going to Sleep....means shutdown........


Enjoy fun ......Dont say Thanks////////Vishal G/////////////

vishal G
Newbie Poster
1 post since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

Try PSShutdown.exe from PSTools from SysInternals.
Works great on all windows.
http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx

HTH

carsbe1

carsbe1
Newbie Poster
1 post since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

It depends on what exactly you want to do, if you want to remotely shutdown the computers just go to the command prompt and type "shutdown -i". It will bring an interface on which PCs are connected and you could shutdown all the PCs simultaneously.Easy aint it!!!!

rhapsodykelz
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

I know that you can shutdown computer with a command like shutdown - .. But I don't really remember what is that. Just going to CMD and type shutdown /help and find out more.

anhbloginc
Newbie Poster
11 posts since Apr 2010
Reputation Points: 10
Solved Threads: 3
 

Why does none of these shutdown commands work, although I can ping the network/remote PC successfully - I have admin rights on that PC and pn same OS etc.

PiesangPrins
Newbie Poster
1 post since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You