Cable Forum

Cable Forum (https://www.cableforum.uk/board/index.php)
-   General IT Discussion (https://www.cableforum.uk/board/forumdisplay.php?f=19)
-   -   Remote Server Shutdown (https://www.cableforum.uk/board/showthread.php?t=31637)

Raistlin 09-07-2005 01:50

Remote Server Shutdown
 
Is there anyway I can remotely shut down a server running Windows Server 2003?

The box is wired to my router which is then wirelessly connected to my laptop.

I know that when I shut the server down normally I have to put in a reason for it being shutdown.

What I'd like to be able to do is send a command from the laptop that just shuts the server down straight away.

Anybody know if this can be done?

Jon M 09-07-2005 02:04

Re: Remote Server Shutdown
 
if the laptop is XP you can use:

shutdown /r /m \\servername

in the "run" prompt

add the switch "/f" if you want to force all programs to close immeadiately
__________________

all switches work equally well with a dash, -m, -f, -r etc.

Raistlin 09-07-2005 02:05

Re: Remote Server Shutdown
 
Ok, tried that.

I keep getting an Access Denied message.

I can ping the server ok though so it doesn't appear to be a connectivity problem.

Jon M 09-07-2005 02:07

Re: Remote Server Shutdown
 
put "shutdown /?" into a command prompt for a full list of available switches

Raistlin 09-07-2005 02:07

Re: Remote Server Shutdown
 
Do I need to supply a reason code ( /d )?

It normally asks for a reason when I shut down from the server.

Ohhh..... Thinking about it, my account on the Laptop doesn't have Admin rights on the server, could that be it?

Jon M 09-07-2005 02:08

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Ok, tried that.

I keep getting an Access Denied message.

I can ping the server ok though so it doesn't appear to be a connectivity problem.

are you logged in with a recognised admin account from the servers point of view?

Raistlin 09-07-2005 02:09

Re: Remote Server Shutdown
 
Quote:

Originally Posted by s1lv3r
are you logged in with a recognised admin account from the servers point of view?

I don't think I am actually, and I can't see a switch that will allow me to specify an Admin account either.

Jon M 09-07-2005 02:11

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Thinking about it, my account on the Laptop doesn't have Admin rights on the server, could that be it?

;), we both wrote about that at the same time. ;)

yes, you will need admin rights
__________________

just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

Raistlin 09-07-2005 02:12

Re: Remote Server Shutdown
 
Is there any way that I can run the shutdown command AS another user (ie as an Admin acount from the Server)?

I know the Username and Password.
__________________

Quote:

Originally Posted by s1lv3r
just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

TBH I'm suprised that they haven't ;)

Jon M 09-07-2005 02:17

Re: Remote Server Shutdown
 
can't you add your laptop account as an admin on the server?

Raistlin 09-07-2005 02:19

Re: Remote Server Shutdown
 
I could do, I was trying to resist doing that though as I didn't want the profile that I'm logged in as at the moment to be continually connected to the server with Admin rights.

I suppose that's the only way I'm going to be able to do it though.

Stuart 09-07-2005 02:19

Re: Remote Server Shutdown
 
Quote:

Originally Posted by Raistlin
Is there any way that I can run the shutdown command AS another user (ie as an Admin acount from the Server)?

I know the Username and Password.
__________________

Quote:

Originally Posted by s1lv3r
just imagine if M$ had created a Server OS you could shut down remotely without admin rights.. lol, it would be an sysadmin's worst nightmare

TBH I'm suprised that they haven't ;)

To run any command as another user, use the "Runas" command. The format is
Quote:

runas /user:domain\username /pass:password "command.exe par1 par2 par3"
where "domain" is the either the name of the domain, or the name of the remote server. Username and password should be obvious. Substitute the actual program for "command.exe" and it's parameters for "par1","par2" and "par3"

Bear in mind that the program uses the account you specify, so if you specify account that doesn't have access to your local system, you might run into problems.

Jon M 09-07-2005 02:24

Re: Remote Server Shutdown
 
nice one stu :tu: I was hitting google while you typed that

Raistlin 09-07-2005 02:31

Re: Remote Server Shutdown
 
Still can't get it to work, I keep getting a message that the login/password is incorrect.

I know that both are right, so I'm not sure what's going on.

I think this might be a topic that I have to have another look at in the morning, my eyelids are starting to close now.

Thanks for the help tonight guys.

Richard M 09-07-2005 02:32

Re: Remote Server Shutdown
 
In other news, Windows users discover sudo.


All times are GMT. The time now is 04:27.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum