Question

Locked

shutdown command line through winsshd

By drewh ·
I'm testing winsshd on windows 2003 x64. I can stop and start services but when I run the shutdown command it errors: 'shutdown' is not recognized as an internal or external command,
operable program or batch file.

however, it will run from the server when run locally.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

This might be due to a few safety measures being in place..

You can run locally on the server itself but not on another machine.

Please post back if you have any more problems or questions.

Collapse -

It may need to be

by The Scummy One In reply to shutdown command line thr ...

written like
shutdown.exe instead of shutdown. Furthermore, on a server, you will need to add a reason for the shutdown, so it may require an option to be selected.

Collapse -

Just to add to Scummy's info

by Jacky Howe In reply to shutdown command line thr ...

If it had the same name as the program you're trying to run in the batch, and you probably didn't specify the file extension when calling it.
So either renaming your original script to MyShutdown.bat or whatever.cmd will do the trick, or you can use shutdown.bat as name, but then you have to specify the shutdown command in the batch file either with the extension or with the path (and finally, if you're saving the batch as shutdown.bat in the same folder as shutdown.exe, you'll always need the extension):
shutdown.exe /r /f
or
%Systemroot%\system32\shutdown /r /f

This will work.

Collapse -

64 bit verus 32 bit and shutdown command

by techrepublic In reply to shutdown command line thr ...

I realize this is an old post but figured someone else might benefit from my solution.
I was able to use shutdown via Remote command only after copying shutdown.exe from system32 to Syswow64. This is likely due to the remote command running under 32bit mode and so access to system32 is redirected to Syswow64.
I then was able to run shutdown from the syswow64 directory.

Just my 2 cents.

Back to Networks Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums