Windows

Five tips for taking a backdoor route to a Windows server reboot

IT pro Rick Vanover shares a number of tricks for rebooting a server when you can't simply go to the Start Menu in Windows.

When you need to reboot a Windows server, you'll occasionally encounter obstacles to making that happen. For instance, if remote desktop services aren't working, how can you reboot the server? Here is a list of tricks I've collected over the years for rebooting or shutting down a system when I can't go to the Start Menu.

Note: These tips are based on an entry in our Servers and Storage blog.

1: Enter the shutdown.exe command

This gem will send a remote (or local) shutdown command to a system. Entering shutdown /r /m \\servername /f /t 10 will send a remote reboot to a system. Shutdown.exe is current on all modern Windows systems; in older versions, it was located on the Resource Kit. For more details, read this Microsoft KB article on the shutdown.exe command.

You can also use the PowerShell equivalent of this command:

Start-Sleep 10
Restart-Computer -Force -ComputerName SERVERNAME

2: Use a hardware management device

If a device such as an HP iLO or Dell DRAC is in use, there is a virtual power button and remote screen console tool to show the system's state regardless of the state of the operating system. If these devices are not configured with new servers, it's a good idea to have them configured in case the mechanisms within the operating system are not available.

3: Hit the virtual machine power button

If the system in question is a virtual machine, all hypervisors have a virtual power button to reset the system. In VMware vSphere, be sure to select the option to Shut Down The Guest Operating System instead of Power Off; this will make the call to VMware Tools to make it a clean shutdown. If that fails, the Power Off button will be the next logical step.

4: Configure a scheduled task through Group Policy

If you can't access the system in any other mainstream way -- perhaps the Windows Firewall is turned on and you can't get in to turn it off -- set a GPO to reconfigure the firewall state and slip in a reboot command in the form of the shutdown.exe command executing locally (removing the /m parameter from the example above). The hard part will be getting the GPO to deploy quickly.

5: Do a console walkthrough

In a situation where the server administrator doesn't have physical access to the system, walking someone through the process may be effective. For security reasons, a single user (domain or locally) can be created with the sole permission of rebooting the server. That person can log on as this temporary user. Then, it is immediately destroyed after the local shutdown command is issued. Further, that temporary user can be created with a profile to run the reboot script on their logon to avoid any interaction by the person assisting the server administrator.

Bonus tip: Try an enterprise system management package

Packages such as Symantec's Altiris and Microsoft System Center agents communicate to the management server and can receive a command to reboot the server.

When all else fails... pull the plug

This is definitely not an ideal approach, but it is effective. For physical servers, if a managed power strip with port control is available, a single system can have its power removed and restored.

What other backdoor ways have you used to reboot a Windows server? Share your comments in the discussion.

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

7 comments
dgordon
dgordon

All this doesn't help if you can't get a command prompt. I was hoping that's what this tip was about.

Joanne Lowery
Joanne Lowery

If all else fails, and you can work out the PID of some of the system processes, you can task kill a critical System PID which will cause a restart. A brutal and risky option but has worked for me

Coss71
Coss71

ALT+F4 will bring up the shut down menu on any Windows machine. Server. XP, Win7 etc.

dfrazier
dfrazier

use the shutdown -i within the dos windows bings up GUI to give te ability to do a remote shutdown or restart ..

ultrasawblade
ultrasawblade

Sysinternal's Psexec utility can invoke a command remotely, and I've used it to shutdown an uncooperative machine before. Windows Server has a nice feature known as the Special Administration Console. It's enabled via boot.ini or by editing the boot-time command line options in the BCD. It works over a serial port, and can allow you do to some limited management tasks, including reboots and shutdowns, even if the system has bluescreened. Only used this in a testing virtual server environment but I can see its value.

Neon Samurai
Neon Samurai

Filename c:\windows\su.cmd @echo off runas /user:administrator "cmd /T:0C /K cls" exit Set file level permissions so user may run but not modify it. Makes doing quick terminal cabable tasks easy without having to log your user off a WinXP workstation. Remote Desktop provides the ability to log out or disconnect but not reboot. If your remoted into a user account, you can always win+R, get an admin command line and run shutdown /r

Editor's Picks