Remote Reboot a Hung Server via Command Prompt

I recently had a remote Hyper-V host that was stuck rebooting. It was still responding to network communication but otherwise was unavailable via RDP. Fortunately, I still had console access via our RMM tool, but I ended up not even needing it! Here are two techniques useful for remotely rebooting a hung server.

Standard Remote Reboot

This often doesn’t work for me, but it’s worth trying first

shutdown /m \\computername /r /f

Remotely Killing winlogon and/or lsass with pskill

Download pskill and install it on a remote machine. Remotely killing the winlogon and/or the lsass process has the effect of immediately bringing the server down. It’s kind of aggressive but often times this is the only way I can get a remote server to reboot.

pskill \\computername winlogon

pskill \\computername lsass

If you guys have any other ideas let me know in the comments and I’ll include them! Thanks.