RSS Forums RSS

How to shutdown remote pc from DOS?

Please support our Windows NT / 2000 / XP / 2003 advertiser: Programming Forums
Thread Solved
Reply
Posts: 2
Reputation: kartik is an unknown quantity at this point 
Solved Threads: 0
kartik kartik is offline Offline
Newbie Poster

Help How to shutdown remote pc from DOS?

  #1  
Jan 24th, 2005
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.
AddThis Social Bookmark Button
Reply With Quote  
Posts: 1,514
Reputation: kc0arf is a jewel in the rough kc0arf is a jewel in the rough kc0arf is a jewel in the rough 
Solved Threads: 49
Colleague
kc0arf kc0arf is offline Offline
Posting Virtuoso

Re: How to shutdown remote pc from DOS?

  #2  
Jan 24th, 2005
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
Reply With Quote  
Posts: 2
Reputation: kartik is an unknown quantity at this point 
Solved Threads: 0
kartik kartik is offline Offline
Newbie Poster

Re: How to shutdown remote pc from DOS?

  #3  
Jan 24th, 2005
Thank you.
Reply With Quote  
Posts: 194
Reputation: dvr is an unknown quantity at this point 
Solved Threads: 4
dvr's Avatar
dvr dvr is offline Offline
Junior Poster

Re: How to shutdown remote pc from DOS?

  #4  
Jan 28th, 2005
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.
Reply With Quote  
Posts: 1
Reputation: pramod123 is an unknown quantity at this point 
Solved Threads: 1
pramod123 pramod123 is offline Offline
Newbie Poster

Re: How to shutdown remote pc from DOS?

  #5  
Aug 31st, 2007
hey anyone online????
Reply With Quote  
Posts: 33
Reputation: fzafarani is an unknown quantity at this point 
Solved Threads: 1
fzafarani's Avatar
fzafarani fzafarani is offline Offline
Light Poster

Re: How to shutdown remote pc from DOS?

  #6  
Sep 4th, 2007
if you access to that computer:
run command, type shutdown -m -s \\remote computer name

thats all
Reply With Quote  
Posts: 1
Reputation: al_v is an unknown quantity at this point 
Solved Threads: 1
al_v al_v is offline Offline
Newbie Poster

Solution Re: How to shutdown remote pc from DOS?

  #7  
Nov 18th, 2007
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).
Last edited by al_v : Nov 18th, 2007 at 7:34 am. Reason: wrong autolinking
Reply With Quote  
Posts: 5
Reputation: BPembo is an unknown quantity at this point 
Solved Threads: 1
BPembo BPembo is offline Offline
Newbie Poster

Re: How to shutdown remote pc from DOS?

  #8  
Nov 19th, 2007
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" )
Reply With Quote  
Posts: 1
Reputation: amazingnessn is an unknown quantity at this point 
Solved Threads: 1
amazingnessn amazingnessn is offline Offline
Newbie Poster

Re: How to shutdown remote pc from DOS?

  #9  
Dec 6th, 2007
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.
Reply With Quote  
Posts: 1,730
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 83
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: How to shutdown remote pc from DOS?

  #10  
Dec 6th, 2007
psexec and company
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the Windows NT / 2000 / XP / 2003 Forum
Views: 103835 | Replies: 12 | Currently Viewing: 2 (0 members and 2 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:33 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC