Is there a way to remotely shut down a Windows machine on my home network that doesn't support RDP?

15

1

I have an older Dell Dimension desktop, originally running Windows XP, that I had recently upgraded to Windows 8.1. I plan on using it as a media server running Plex, and I can easily move files on to it over my home network and update the library through the Plex web admin. I would also like to be able to shut down the machine when I’m not using it.

I don’t want to plug a monitor and a keyboard into it, so I’m not sure how I can do this, since remote desktop is apparently only available in Windows 8.1 Pro for some reason. The only thing I can think of is to set up a web server that runs some highly-trusted code that can invoke the shutdown command on the host, but I imagine there is a simpler way.

regularmike

Posted 2015-09-11T04:38:02.083

Reputation: 253

4What aboutshutdown /iaftercmdkey /add:? – user2284570 – 2015-09-11T19:39:06.780

I use and like NoMachine to do remote desktop to the computer I use as media server.

– Jonathan Drapeau – 2015-09-11T19:45:21.950

I wonder if the system power settings, and making the system hybernate might be a less complex solution. Not sure how the timers work headless tho. – Journeyman Geek – 2015-09-12T00:42:33.870

"remote desktop is apparently only available in Windows 8.1 Pro" lol really? how dumb – Lightness Races with Monica – 2015-09-12T13:20:02.790

@LightnessRacesinOrbit yeah, it's just not there, and that's what I've read. I was surprised, too. – regularmike – 2015-09-12T13:33:34.917

Perhaps a simpler approach could go the other way: run a job on the machine that periodically polls some outside source and executes shutdown if so. For instance, if you have a web server somewhere, you could create a file that the machine would fetch over http, and shut down if it contains some magic text. When you want it to stay up, you change the file appropriately. – Nate Eldredge – 2015-09-12T17:10:57.653

@LightnessRacesinOrbit Microsoft considers the ability to Remote Desktop into a Windows machine an enterprise feature and therefore only includes it in the more expensive Professional edition. But then here at Super User we like to push our software beyond its limits, don't we? – I say Reinstate Monica – 2015-09-12T17:49:18.083

More to the point, Microsoft considers that on the whole people who need RDP have more money than people who don't, and so it makes sense as one of the features used in their differential pricing model. It's "dumb" to the extent (if any) that Microsoft loses money as a result. I think "enterprise feature" generally amounts to "stuff you can live without unless you're one of the kind of customers liable to have money to throw at the problem". – Steve Jessop – 2015-09-12T17:51:41.977

@user2284570 I'm not following. That would require a keyboard, right? I don't want to use any peripherals. – regularmike – 2015-09-13T12:16:12.127

@regularmike : Yes but you run those built‑in commands on the host machine, not the target. Once you added an administrator password account password withcmdkey you have full control of the machine silently.shutdown /iis only one example of you can do. There is nothing to install on both machines. – user2284570 – 2015-09-13T12:53:35.077

Answers

17

VNC (TightVNC or many other flavors) is a freeware graphical remote control solution like Remote Desktop you wanted to use. It supports Windows 8.x. VNC though a SSH tunnel is recommended for usage across the Internet.

Alternatively if you enjoy the command line, try running an SSH server on your media server. You can then run an ssh client (like PuTTY) which would allow the automation of file transfers and access to the command line with high security. Inside of an ssh session or even directly from another Windows machine, you can use the shutdown command-line. This allows you to shut down or restart a local or remote computer.

For a low-tech solution, try holding the power button down quickly for a second or less (not the 5 seconds for a hard power off). Windows should shutdown gracefully or go into standby, depending on configuration.

As Peterh mentioned, you can also use telnet a command-line interface built-in to windows. See control panel, add-remove programs. While telnet is insecure for a home network it is a possibility. SSH is the recommended secure encrypted alternative that only takes a little longer to setup.

GeraldB

Posted 2015-09-11T04:38:02.083

Reputation: 262

11There's no need to hold the power button and risking pressing it for too long. A single press for less than a second is sufficient. – André Borie – 2015-09-11T07:12:53.690

@AndréBorie Thanks, that is a better explanation, updated. – GeraldB – 2015-09-11T09:02:50.860

You could also consider using freenas instead of windows as the OS – JamesRyan – 2015-09-11T12:07:20.460

VNC is not very secure, especially when over the Internet. – Siyuan Ren – 2015-09-11T15:11:35.837

1@SiyuanRen these are just machines on my home network. I'm not opening anything up to the outside world. – regularmike – 2015-09-12T13:34:36.440

47

Such "highly trusted" code already exists.

  • The shutdown tool can do remote shutdowns over RPC, as long as File Sharing is enabled:

    shutdown -m \\plexbox -s -t 0 -f
    

    Its Linux Samba equivalent:

    net rpc -S plexbox -f -t 0
    

    (Note that this needs SeRemoteShutdownPrivilege separate from the regular "local shutdown" privilege – even if you use it locally. This can be granted to non-admins via secpol.msc.)

  • PowerShell Remoting can be used to run PowerShell commands.

  • You can install a SSH server, such as Bitvise WinSSHd.

  • psexec was the usual pre-Remoting tool for running programs remotely. (Although I can't get it working with Active Directory anymore...)

  • Finally, as GeraldB also wrote, there are other graphical remote control tools besides RDP – such as VNC, TeamViewer, radmin, etc.

user1686

Posted 2015-09-11T04:38:02.083

Reputation: 283 655

@Andy I am unfamiliar with File Sharing. Why do you say that? – Zach Mierzejewski – 2015-09-11T18:11:58.350

@Andy without underestimating your comment, your comment should have a backup, it's like saying "do not buy apples" is not constructive. – Francisco Tapia – 2015-09-11T18:16:21.427

@Andy The question discusses using Plex "on their home network" and not over the internet, which is the usual use case for Plex. I don't think we're talking about exposing anything over the internet here, just within the local network. – Chris Hayes – 2015-09-11T18:37:04.403

@ChrisHayes yes you are right, i missed that. You can connect to plex from the internet though, that's one of the features of the paid license. Francisco, windows file sharing (smb) is terribly insecure, my comment was closer to "don't eat rat poison" – Andy – 2015-09-12T01:08:55.483

3Since the goal is to shut down the target computer, psshutdown would probably be a more appropriate choice than psexec. – Harry Johnston – 2015-09-12T05:05:09.140

@grawity What do you mean about PSEXEC I can't get it working with Active Directory anymore? – I say Reinstate Monica – 2015-09-12T17:45:36.420

@Twisty: Exactly that? Not sure if it's caused by AD, or by Samba as AD DC, or by whatever, but I get a very obscure error message from it. – user1686 – 2015-09-12T17:57:51.460

@grawity Sounds like a good SF question I just may have an answer for – I say Reinstate Monica – 2015-09-12T17:59:17.400

3@Twisty SF as in ServerFault? Don't I need to manage a multinational network to ask questions there? – user1686 – 2015-09-12T20:44:07.953

Instead of net rpc -S plexbox -f -t 0 , did you mean net rpc -S plexbox SHUTDOWN -f -t 0 ? – TOOGAM – 2016-08-08T13:51:04.927

1@Twisty: (For the record, the psexec problem seems to have been caused by Samba missing an implementation of the BackupKey protocol; 4.4 does not have this problem anymore.) – user1686 – 2016-08-08T15:08:41.820

9

Find an old computer with a CD-ROM drive. Install linux. Name it HOMECOMPUTERSHUTDOWNROBOT. Find a plastic stick, about 2 inches long. Superglue it to the CD-ROM door so that it sticks straight out from the computer. Position the old computer so that the stick points at the power button for the computer you want to shut down. Use old books as necessary to prop the computer up to the needed height to do so.

When you want to turn off the computer, SSH into HOMECOMPUTERSHUTDOWNROBOT. In the terminal, use the eject command to eject the CD drive. The plastic stick will push the power button of the computer not supporting RDP and turn it off.

Oesor

Posted 2015-09-11T04:38:02.083

Reputation: 300

Slight modification: aim the stick at the power plug strip reset button. This enables PowerSaver++ – Yorik – 2015-09-11T14:56:41.687

Or... you can train a dog. use the second computer to make a audible command and create a way for the dog to turn if off/on. – WernerCD – 2015-09-11T16:59:26.887

2Great. But don't forget the second robot that you use to shut the robot down remotely. – Matt Thomason – 2015-09-11T21:01:44.227

naw, power buttons arn't designed for paws. I'd know. Isn't this from dailywtf – Journeyman Geek – 2015-09-12T00:36:15.230

I'm pretty sure this idea was in a TalesFromTechSupport story on reddit. – Carl Walsh – 2015-09-12T07:16:03.027

4This also has the advantage that you can use it to turn the computer on again too. – zelanix – 2015-09-12T12:36:23.200

Optionally you can include other devices, like rolling 8-ball, ropes, levers or mouse running in cage. :) The Incredible Machine anyone?

– miroxlav – 2015-09-13T16:38:48.633

2

Another option for remote control, in addition to RDP and VNC, is services like LogMeIn, Team Viewer, WebEx or other similar alternatives to screensharing.

These options, like VNC, generally involve installing a client. You can then use their service to log into a computer remotely.

WernerCD

Posted 2015-09-11T04:38:02.083

Reputation: 4 263

2

Start menu, control panel, and or remove software / windows components. Click add / remove windows components.

Find "telnet server" in the tree, and enable it. For now, you can get a remote command line with any telnet client (I would suggest either the telnet client in windows, can be enabled there, too), or putty (can work as a telnet client as well).

Logging there remotely you can halt / restart your machine with the common shutdown ... commands.

But beware: telnet is among the most cracked protocols of the internet, because it send everything (incl. passowords) unencrypted. Thus I highly suggest to combine this solution with an encrypting VPN.

peterh - Reinstate Monica

Posted 2015-09-11T04:38:02.083

Reputation: 2 043

0

Alternatively you can write a Python script that listens on a port via sockets (must port forward if you'd like to access from anywhere) and you can issue it commands via a Python socket client or through a PHP socket_write() to execute an appropriate task aka shutdown

uhfocuz

Posted 2015-09-11T04:38:02.083

Reputation: 101

0

Native windows solution (even works on ɴᴛ4). Very Simple. No need to install anything.

  1. If the machines aren’t member of the same active directory domain you’ll need to run this command the first time as an administrator on the host machine (it will be added permanently) : cmdkey /add:Netbios name or ip target address /user:a local administrator account name existing on the target machine /pass:password of the account

ꭥ 2. Then and for all the time you will need it, simply runshutdown /i. (Sorry but I can’t change the language)

user2284570

Posted 2015-09-11T04:38:02.083

Reputation: 1 160

-1

You can use this tool (an early version, but fully functional):

https://github.com/r4zv4n/PlexShutDown

It will allow you to remotely shutdown the PlexMediaServer computer, by playing a a custom title from your library.

d-man

Posted 2015-09-11T04:38:02.083

Reputation: 1

Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change. – DavidPostill – 2016-08-08T21:31:42.377