Backdoor ways to reboot a Windows server

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 simply go to the Start Menu in Windows.

* 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.
* PowerShell Restart-Computer: The equivalent of the command above in PowerShell is:


Best Microsoft MCTS Training – Microsoft MCITP Training at Certkingdom.com

Start-Sleep 10
Restart-Computer -Force -ComputerName SERVERNAME
* 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.
* 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 the 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.
* Console walkthrough: In the situation where the server administrator does not have physical access to the system, walking someone through the process may be effective. For security reasons, basically a single user (domain or locally) can be created with the sole permission of rebooting the server. That person could log on as this temporary user, and then it is immediately destroyed after the local shutdown command is issued. Further, that temporary user could be created with a profile to run the reboot script on their logon to not have any interaction by the person assisting the server administrator.
* 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 above). The hard part will be getting the GPO to deploy quickly.
* Enterprise system management packages: 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.
* 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.

Get IT tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.

How to connect to and from Windows 7 and Linux using TightVNC

One of the single most important aspects of a computer, from an administrative standpoint, is the ability to handle administration remotely. Nearly every operating system offers tools for such a task, but what do you do when you want to go cross-platform? The best bet is VNC (Virtual Network Computing). If you are connecting to a Windows Terminal Server the task is simple…but if you want to connect to a Windows desktop from a Linux client, you might find yourself having trouble connecting to RDP. Instead you want VNC and the best way to get VNC is by using


Best online Microsoft MCTS Training, Microsoft MCITP Training at certkingdom.com

TightVNC.

TightVNC is a free VNC tool that offers both a viewer and a server for Windows clients and a server for Linux clients. Let’s take a look at how to set up the necessary servers on both operating systems so you can log in remotely.
Linux to Windows

As you would expect, the installation of TightVNC is simple on a Windows client. All you need to do is download the correct installation file from the TightVNC download page, double click, and walk through the installation. It’s very straight-forward.

Once you get TightVNC installed, however, the straight-fowardness flies out the window. In order to make a connection to that machine the TightVNC server must be configured and started. In order to do this you first must click Start | All Programs | TightVNC | TightVNC Server (Application Mode) | TightVNC Server – Offline Configuration. From this window, click on the Server tab (see Figure A) and configure TightVNC server to fit your needs.
Figure A

You are required to set a password for incoming connections and this password can not be blank.

The minimum you need to set is a password. Once that is set you are ready to start the server. In order to start the server click Start | All Programs | TightVNC | TightVNC Server (Application Mode) | Run TightVNC Server. You will not see any applications launching since this is just a daemon running in the background.

Now from your Linux box, open up your default remote desktop viewer, enter the IP address of your Windows VNC server and connect. You will be prompted for a password before the connection will be completed.

If you are not sure what VNC viewer to use, my personal favorite is Vinagre, an easy-to-use VNC viewer for the GNOME desktop.
Windows to Linux

This one is a bit easier. I will show you how to set up this connection on an Ubuntu 10.10 machine. The first step is to install tightvncserver. To do this, follow these steps:

1. Open up the Ubuntu Software Center.
2. Search for tightvncserver (No quotes).
3. Click the Install button for tightvncserver.
4. Enter your sudo password.

Once this is complete you are ready to connect. Follow these steps to get the server running.

1. Open up a terminal window.
2. Issue the command tightvncserver.
3. You will be prompted to enter a password.
4. Enter a view-only password if needed.

You are now ready to connect to your Linux box with the TightVNC Viewer. To open up this tool, click on Start | All Programs | TightVNC | TightVNC Viewer. When this new window opens you will need to enter the IP address with the port 5901 included. So the location will be 192.168.100.21:5901. If you do not enter the port, the Windows version of TightVNC Viewer will assume the port to be 5900 and will not be able to connect.

Upon successful connection you will prompted for the password set when you initiated the server on the Linux machine. With successful authentication you will be connected (see Figure B).
Figure B

TightVNC Viewer to tightvncserver means easy remote administration of a Linux machine from a Windows host.

Final thoughts

There are plenty of ways to connect to a remote machine. Having a uniform method (such as using TightVNC both ways) simplifies the task on numerous levels. How do you make your remote connections? Do you use VNC, RDP, or another third-party software (such as Logmein)? Share your remote experiences with your fellow TechRepublic viewers.

Get IT tips, news, and reviews delivered directly to your inbox by subscribing to TechRepublic’s free newsletters.