Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get my server to remotely shutdown another 1

Status
Not open for further replies.

da644

Programmer
May 21, 2001
159
GB
Hi Guys.

I have a Windows 2003 Server connected to a APC UPS and when the power fails it will run a script. I also have a second machine and switch powered from the same UPS. When the power fails I want to run the script and in that script send a command to machine2 (a Windows 2000 Server) to shutdown. According to some stuff I've found on Google I should be able to do this using the shutdown.exe program in the system32 directory. The command that I believe is correct is:

shutdown /s /m \\servername

I have tried this from the command line to test it, but I always get the following error message:

servername: The entered computer name is not valid. Check the name and then try again or contact your system
administrator.(53)

However, if I do

ping servername

it finds the server ok.

Is there some sort of permissions I need to change to get the other server to accept this shutdown command?

Thanks in advanced.

Andrew.
 
Are both these servers on the same domain? The account that runs the script on the 2003 server needs to have local admin rights on the 2000 server. However, I don't think that's the problem here. Have you tried replacing \\servername with \\server.ip?

I done the following on one of our servers just now and it worked:

shutdown /m \\myXP-PC /r

For obvious reasons I didn't want to test it out on one of our 2000 servers !!
 
Just a thought - is the shutdown.exe app on the remote system?
I don't know if you need it, but I would have thought so as a guess.

Steve.
 
Still no joy with this. Both computers are part of the same domain and I'm running shutdown as administrator logged onto the domain. I have tried with both computer name and IP address. I have also tried shutting down a workstation (winXP) and it does the same.

Any other ideas?

Andrew.
 
Another thing to try might be to issue the shutdown command directly on the 2000 machine - just for testing purposes. At least then we're eliminating some stuff and starting to break it down. If it doesn't work there, then we know where the problem lies, plus the error you receive when you run it locally might give you more a clue as to what the problem is. If it does run on the W2K machine, then we can look at something else.

Having said that, the tool bofhrevenge2 referenced above is quiet good.

Anyway, hope one of these works out for you. Let us know what happens
 
ok... got it sorted... psshutdown worked first time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top