To use Windows "shutdown" or "psshutdown" remotely, turn off UAC

I was wrestling with trying to get shutdown or psshutdown to remotely shut down a Windows machine.

These instructions (for shutdown) seemed so straightforward: ensure the relevant service is running, that it has access through the Windows firewall, and that the calling username is aligned with one on the remote box that has permissions to shutdown.

psshutdown avoids the latter point by letting you specify the username/password.

But everything I tried returned Access Denied.

The answer, it turns out, is to switch off UAC for that user on the remote box. Then it works:

psshutdown \\tintin -u daniel

PsShutdown v2.52 - Shutdown, logoff and power manage local and remote systems
Copyright (C) 1999-2006 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:
TINTIN is scheduled to power off in 00:00:20.

Of course, UAC is there for a good reason. In this case I’m not too troubled because the box involved is one I’m going to decommission in the near future, but one would hope there’s a way of making this work with UAC still enabled.

One thought on “To use Windows "shutdown" or "psshutdown" remotely, turn off UAC

Comments are closed.