Home > Posts > HowTo: Reboot remote Windows computer with unresponsive RDP

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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: