Archive

Posts Tagged ‘Reboot’

HowTo: Reboot remote Windows computer with unresponsive RDP

I recently had an issue with an older Windows Server 2008 R2 server that couldn’t logout which had resulted to Remote Desktop not connecting to it anymore (not even with the “admin session” option). Luckily I had an admin go and physically cycle its power since it was a physial one without any lower level control available.

When the same issue occured at its twin machine, I decided before asking for another physical intervention to first try various other ways to reboot it remotely (e.g. via Windows Shutdown command and via the Computer Management console), but to no avail.

Eventually what worked was SysInternals PsShutdown tool. The syntax I used was:

PsShutdown –u AdminUserName –p AdminPassword –f –r \\MachineIPaddress

According to its command-line reference:

-u
Specifies optional user name for login to remote computer.

-p
Specifies optional password for user name. If you omit this you will be prompted to enter a hidden password.

-f
Forces all running applications to exit during the shutdown instead of giving them a chance to gracefully save their data.

-r
Reboot after shutdown.

I could maybe have used

-o
Logoff the console user.

instead of –r, but it didn’t help when I first tried without the –f option.

Guess if I had passed –f too in the first place with –o it might have worked, but it never hurts to do a reboot, unless you have any critical services you’re not sure will restart correctly. However, I would worry more about such a thing on a Unix machine rather than on a Windows one where periodic rebooting usually gives a “breath of fresh air” to the OS.

Most probably some application was preventing logoff, however I’d expect Remote Desktop / Terminal Service to be more robust in such a case.

%d bloggers like this: