Galin Iliev's blog

Software Architecture & Development

Reboot PC from network

Today I tried to to RDC(Remote Desktop Connection) to a remote computer (of course) and I got a nasty error basically saying that I need to restart the machine in order to connect to it :) So I searched the web for a bit, connected to another computer in same LAN, shot the command and waited for about 5 minutes and… voila. I was able to connect.

So what is the command?! shutdown, of course :)

shutdown -m //computername -r -f
-s shutdown
-r restart
-f force close any applications
//computername or ip

Or just run
shutdown /i
and the UI on the right will appear to make you feel more

For more information see Microsoft Knowledge Base Article: How To Use the Remote Shutdown Tool to Shut Down and Restart a Computer in Windows 2000.

P.S. The target machine was Windows Server 2008 so this one still works :)


Comments (3) -

  • Nanyo Nanev

    3/29/2009 8:59:26 PM | Reply

    You are lucky that you have working RPC. I mention our old server (Win2003).

  • Anton Staykov

    3/30/2009 6:01:34 PM | Reply

    How about network credentials? Shouldn't this command be authenticated on the remote machine, or anyone can restart your PC ?

  • Galin Iliev

    3/30/2009 10:13:36 PM | Reply

    of course there is a authentication Smile. As in RPC communication two approaches are used: 1. Both Pcs are members of same domain.
    2. Both PCs have one common user - same username/password
    I haven't tested this fully, though...