Remote Shutdown of a Windows Computer from Linux

I was away for a few days with my family visiting relatives, but being self-employed it can be hard to take time off, and wouldn’t you know it I had to spend a little time online checking email, finding passwords for people and occasionally just checking in on things at the house through a remote desktop connection to my Windows computer back at home.

The only problem is that after the first night I was not able to connect to the remote desktop. I knew the machine was there, I could SSH into my Linux server and ping the Windows computer but there was no way it would properly connect a remote desktop connection. I had to reboot the Windows machine to see if I could get it back to normal. Thankfully my Linux server uses Samba as well and with a little searching I soon had my answer: redhat-fedora-linux-help/60324- remote-shutdown-windows-linux-box.html#post573872 net rpc SHUTDOWN -C “some comment here” -f -I x.x.x.x -U user_name%password

I modified it a little bit and came up with this: net rpc shutdown -r -f -I -U username

I entered my password and a few minutes later guess what I was able to do? I was able to connect to my remote desktop on my Windows machine back at home. Linux saves Windows once again.

Categories: tools