Shutting down a host

To shutdown a host, right-click it and select Shutdown.  An options window will popup like this one.  You can select more than one host to shutdown.

In shutdown options you have the ability to specify the message that will be displayed to logged-in users, you may specify a time delay before shutdown, and if any apps are open, you may force them to close.  By checking the “reboot” option, the host will be rebooted instead of shutdown.

When you are finished with options, click “Shutdown”.

Windows hosts in a domain environment

To shutdown Windows hosts in a domain environment, select “WMI” as the shutdown method. This is the default shutdown method, and is what you should use whenever possible. If your host accounts are different from yours, you can specify a user id, password, and domain on this page.

Linux Hosts

For Linux servers, I use “plink.exe” to send a poweroff command.  Plink is a command-line tool that comes with Putty and it is available here.  In this example, I have used $PASS, $USER and $HOST to substitute the password, userid and hostname from the Credentials page. To use a custom command to shutdown a host, select “Custom” as the shutdown method.

The following parameters can be substituted with custom command:

NameDescription
$HOSTThe name or IP address of the remote computer
$USERThe user id that was entered on this page
$PASSThe password from this page
$PFThe Program Files folder
$PFX86The Program Files (x86) folder

You can have multiple commands executed in a custom shutdown event.
Let’s combine the following 3 commands:

  1. C:\Program Files (x86)\Putty\plink.exe -ssh -pw password root@machine /sbin/poweroff
  2. net use \\machine /USER:phil password
  3. shutdown -s -f -t 10 -m \\machine

We could substitute some parameters and combine the commands like this:

cmd /C "$PFX86\Putty\plink.exe" -ssh -pw $PASS $USER@$HOST /sbin/poweroff & net use \$HOST /USER:$USER $PASS & shutdown -s -f -t 10 -m \$HOST

Windows hosts in a workgroup environment

Shutdown on workgroup computers is very unreliable. To get this to work you can try the “Legacy” shutdown method. You must enter a user id and password. You can leave the domain blank as it is not used. If this works, great. If it doesn’t work, you will probably need to change a registry setting on the host you are shutting down that will allow the RPC command to work.

Open the registry and go to this key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Add this key, or change it if necessary:

LocalAccountTokenFilterPolicy = dword:00000001