Microsoft

How do I shut down my Windows server without logging on?

John Sheesley explains registry changes you can make in Windows NT and Windows 2000 to enable the Shut Down button from the Windows server logon screen.


For security reasons, it’s always a good idea to leave your server on the logon screen rather than actually logging in when you’re not going to be around to watch it. However, when you have to shut your server down and you’re not already logged in, you must first log in, wait for everything to load and then select Shut Down from the Start menu, which can take a bit of time. Of course, there is a faster way: By making a change in registry, you can shut your server down without logging in. Here's how to do it.

Danger! Danger! Danger!
This article discusses making changes to your server's registry. Before performing any technique in this article, make sure you have a complete backup of your server. If you make a mistake when making changes to your server's registry, you may cause your server to become unbootable, which would require a reinstallation of Windows to correct. Proceed with extreme caution.

Don't log in and walk away
You may have the habit of logging in to your Windows server when it boots, in which case shutting down from the logon screen isn’t much of a concern. However, you shouldn't log in and walk away from your server. Unless it's in a secure area, logging in allows any passerby to snoop around or make changes on your server. Also, if you log in as the administrator and walk away from your computer, a person could walk right up to the server and do just about anything, from deleting all of the users on your computer to viewing and copying files onto floppy disks.

But even if your server’s locked in a server room, there are potential dangers from leaving it logged in. Inadvertently, Windows can leak important information across your network. Using a simple utility such as Red Button, hackers can find out the name of the user ID logged in to the server. From there, they can play "guess the password" to try to gain full access to the server.

So to keep your server more secure, the best thing to do is not to log on to the server if you aren't going to physically be near it. Instead, boot it and leave it at the login screen.

However, this creates a problem if you must quickly shut down your server. Normally, you'd have to log in to the server, wait for everything to load, go through the shutdown procedure, and then wait for everything to unload. But there’s a better way to do this.

You may have noticed a Shut Down button on the Windows server logon screen. However, it’s grayed out, meaning it’s there, but you can’t use it. With a quick trip into the server’s registry, though, you can activate this Shut Down button.

Making the Shut Down button available
Before you enable the Shut Down button, make sure you’ve located your server in a secure location. The downside to enabling this feature is that any passersby can take your system down with a click of a button. You don’t have to worry as much about this happening, though, if it’s in a safe area.

To force Windows NT and Windows 2000 to display the Shut Down button on the logon screen, log on to your server as Administrator or as a user with administrator rights. Start the registry editor by selecting Run from the Start menu, typing regedt32 in the Open text box, and clicking OK. From here, the two systems diverge. If you’re running Windows 2000, you’ll make the registry change in a different location than Windows NT.

In Windows NT, when the Registry Editor window opens, navigate the left pane until you get to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon hive. In the right pane, look for the value named ShutdownWithoutLogon.

To change the value, double-click it. You’ll then see the String Editor. Enter a value of 1 in the String field and click OK.

If the value doesn't exist, you'll need to add it. Select Add Value from the Edit menu. When the Add Value menu appears, enter the name of the value in the Value Name field exactly as listed above. Make sure the Data Type list box contains the value REG_SZ and then click OK. You'll then see the String Editor screen. In the String field, enter a value of 1 and click OK.

In Windows 2000, you’ll find the ShutdownWithoutLogon key in the exact same location as in Windows NT. However, if you change the value to 1, it won’t change the Shut Down button. The key only appears to exist in this location for compatibility reasons.

To enable the Shut Down button in this version of the OS, you must navigate the left pane until you get to the HKEY_LOCAL_MACHINE\SOFTWARE\CurrentVersion\policies\system hive. In the right pane, look for the value named shutdownwithoutlogon. For some reason, Windows 2000 also lists this key in all lowercase.

To change the value, double-click it. You’ll then see the DWORD Editor. Enter a value of 1 in the Data field and click OK.

Add the value if it doesn't exist by selecting Add Value from the Edit menu. When the Add Value menu appears, enter the name of the value in the Value Name field exactly as listed above. Make sure the Data Type list box contains the value REG_DWORD and then click OK. You'll then see the Data Editor screen. In the String field, enter a value of 1 and click OK.

Conclusion
After you've changed or added the key for the appropriate system, you're finished. Quit the Registry Editor and restart your server for the change to take effect. Then, whenever you boot your server, the Shut Down button will be active and working on the logon screen.

Editor's Picks

Free Newsletters, In your Inbox