Remote shutdown

The basic command with psshutdown (a part of PSTools Suite via Microsoft)  is:

psshutdown -c -f -r -u ComputerName\UserName -p Password \\ComputerName
-c is for allowing the remote user to cancel the shutdown (20 seconds default)
-f is for force applications to close

The advantage of using psshutdwon as opposed to simple shutdown is that it allows username/password.

I had difficulty using either psshutdown or simply shutdown to restart a remote machine. Turns out simple file sharing needed to be turned off.

Open Explorer
Go to Tools
Select the View tab
Uncheck “Simple File Sharing (recommended)”

If that doesn’t do the trick then try these other two actions:

Make sure the policies allow remote shutdown (template or not)

  1. Here are the steps to make the template:
  2. Use an admin account and run MMC.
    (If you do NOT want to mess with creating a template and just want to enable remote shutdown on one machine, use secpol.msc instead. Gpedit.msc will also work)
  3. Right click on the directory and create a new template. Name it whatever you want (I called it “RemoteShutdown”. Skip this if you are using secpol or gpedit)
  4. Expand “Local Policies”, and expand “User Rights Assignment”
  5. Find “Force shutdown from a remote system” and double-click on it.
  6. Here it varies, if you want only specific users, add them here in the box. However,  If you want groups, including built-in groups like “administrators” “users” and “interactive”, you MUST click on “browse” and then click on object types, and check the checkbox for groups. Then enter the group name and click the “check names” button. You must go through this for each group or for some reason it might not work. I’ve tested and confirmed that it doesn’t always recognize the “users” group unless you go through those extra steps. It’s why I had so much trouble.
  7. Next repeat steps 5 and 6 using the “Shut down the system” policy. Adding the “interactive” group here might also be a good idea. It is very important that any user or group you entered in step 6 also be entered here.
  8. Save the template. Install and apply the template to all computers on the network you want to be able to shut down remotely.

For Win7 or Vista (maybe Win8)

  • Type regedit in the Run box
  • Go to HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
  • Check the right side of the window to see if you have an entry for LocalAccountTokenFilterPolicy. If you do change its value to 1
  • If the entry does not exist, right click, select New > DWORD (32-bit) Value and name it LocalAccountTokenFilterPolicy. Then double click the new entry and change its value to 1
  • Reboot your machine