Remotely restart a windows machine

Eliot Moss moss@cs.umass.edu
Fri Sep 25 14:57:36 GMT 2020


On 9/25/2020 10:36 AM, john doe wrote:
> On 9/25/2020 4:28 PM, Peter J. Krum via Cygwin wrote:
>> The syntax of this command is:
>>
>> NET
>>      [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
>>        HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
>>        STATISTICS | STOP | TIME | USE | USER | VIEW ]
>>
> 
> This is a Windows command, I would look at 'shutdown.exe' or whatever
> tools is using rpc to restart windows remotely.

shutdown is the program that the OP desires to run remotely.  The question boils down to: How, using 
Cygwin, can I send a remote command to another computer on the network?

If the remote has sshd installed and set up, you could:

ssh user@remote shutdown ...

If you don't, I'm not sure what tools are available.  NET SESSION might be relevant;
it's a Windows thing I have never used.


But I suspect you really want Samba administration tools under Windows.  A little bit
of web search found RSAT (Remote Samba Administration Tools, for Windows).  Maybe that
will help?  If it has command line tools, you can invoke them from Cygwin if they're
on your PATH.

Regards - EM


More information about the Cygwin mailing list