15

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.

  • 4
    What aboutshutdown /iaftercmdkey /add:? – user2284570 Sep 11 '15 at 19:39
  • I use and like NoMachine to do remote desktop to the computer I use as media server. – Jonathan Drapeau Sep 11 '15 at 19:45
  • 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 Sep 12 '15 at 0:42
  • "remote desktop is apparently only available in Windows 8.1 Pro" lol really? how dumb – Lightness Races with Monica Sep 12 '15 at 13:20
  • @LightnessRacesinOrbit yeah, it's just not there, and that's what I've read. I was surprised, too. – regularmike Sep 12 '15 at 13:33
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.

  • 11
    There'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 Sep 11 '15 at 7:12
  • @AndréBorie Thanks, that is a better explanation, updated. – GeraldB Sep 11 '15 at 9:02
  • You could also consider using freenas instead of windows as the OS – JamesRyan Sep 11 '15 at 12:07
  • VNC is not very secure, especially when over the Internet. – Siyuan Ren Sep 11 '15 at 15:11
  • 1
    @SiyuanRen these are just machines on my home network. I'm not opening anything up to the outside world. – regularmike Sep 12 '15 at 13:34
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.

  • @Andy I am unfamiliar with File Sharing. Why do you say that? – Zach Mierzejewski Sep 11 '15 at 18:11
  • @Andy without underestimating your comment, your comment should have a backup, it's like saying "do not buy apples" is not constructive. – Francisco Tapia Sep 11 '15 at 18:16
  • 3
    Since the goal is to shut down the target computer, psshutdown would probably be a more appropriate choice than psexec. – Harry Johnston Sep 12 '15 at 5:05
  • 3
    @Twisty SF as in ServerFault? Don't I need to manage a multinational network to ask questions there? – grawity Sep 12 '15 at 20:44
  • 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.) – grawity Aug 8 '16 at 15:08
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.

  • Slight modification: aim the stick at the power plug strip reset button. This enables PowerSaver++ – Yorik Sep 11 '15 at 14:56
  • 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 Sep 11 '15 at 16:59
  • 2
    Great. But don't forget the second robot that you use to shut the robot down remotely. – Matt Thomason Sep 11 '15 at 21:01
  • naw, power buttons arn't designed for paws. I'd know. Isn't this from dailywtf – Journeyman Geek Sep 12 '15 at 0:36
  • 4
    This also has the advantage that you can use it to turn the computer on again too. – zelanix Sep 12 '15 at 12:36
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.

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.

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

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)

-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.

  • 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 Aug 8 '16 at 21:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.