Server Core: Time to start embracing the command line

Relying on GUIs is a dangerous crutch, so Microsoft is steering Windows Server admins away

Give an administrator a command-line tool ... and watch how quickly that admin searches the Internet for a GUI counterpart. But what if the CLI (command-line interface) is the only way to accomplish certain administrative tasks? Well, you might balk. That is why I stick with Windows; it has plenty of GUI interfaces.

And yet, some aspects of Exchange 2007's messaging infrastructure can be configured only through the command-line Exchange Management Shell (built on PowerShell). And with the new Server Core version of Server 2008, it might be time for network admins to re-evaluate their view of the CLI for the sake of their own professional advancement. The reason? Server Core takes the Windows out of Windows and only presents a CLI.

Don Jones, a Microsoft MVP (most valuable professional) for PowerShell says, "The GUI is ultimately a handicap to one's career. I think Server Core represents a low-risk way to start embracing the CLI." So Microsoft is steering admins back to the CLI through its focus on Server Core and PowerShell: "More and more is built on the CLI. Providing people with GUI crutches is like giving your kid Velcro shoes -- it saves some time now, but eventually he'll still have to learn to tie shoelaces, and the longer you put that off the harder it'll be," Jones says.

Server Core was designed, not as some torture device for admins, but rather as way to reduce the "attack surface" on the server by avoiding the installation of features that aren't necessary. For example, if you know you want a server to act as a DNS server, do you really need to have all the additional GUI aspects of the server installed? Absolutely not! Some of those features and services are simply targets to be exploited. So, when installing Server 2008, you can choose to install the Server Core version of the OS.

Once Server Core is installed, Windows Server greets you with a traditional command prompt. You may wonder why you aren't greeted with PowerShell, what with all the talk of its being the CLI of the future. But the fact is it requires the .Net Framework, which isn't supported in Server Core. Remember: The whole idea of Server Core is a smaller footprint and modularized architecture.

There are tricks to get PowerShell up and running in Server Core, if you do the Web searches, but you are better off waiting for the Framework Team to come up with the Server Core flavor of .Net before you start opening up security holes in your Server Core server.

Back to the command prompt shown below, for those of you who have been staying in GUI land. Perhaps you have been working as an admin for quite some time. You might recall your DOS commands. You may even recall some of your NT 4.0 commands for networking and making server adjustments. But even so, there are some new commands to handle newer Windows Server capabilities that you will have to learn. For example, because the server is installed initially without any roles, you need to install those roles and features manually.

Under Server Core, the commands you need to learn are:

  • oclist.exe, to show you a list of which roles and features are already installed, and also to show you the proper spelling and case of those roles and features
  • ocsetup.exe, to let you install or uninstall the roles and features you need

There are other commands you need to recall to mind (or learn for the first time) to configure the server: netsh, netdom, and slmgr, to name a few.

If you're concerned that you'll be stuck in the CLI forever, relax. Once configured, the Core Server is still managed in familiar GUI ways. For example, once a role is installed, you can usually work with the familiar MMC console to manage that role remotely.

Plus, even within the CLI-oriented Server Core there are GUI tools that you can bring up. Type Notepad and it appears. Type Taskmgr, and it comes up. You can even type Regedit to alter the registry settings. And a few control panel apps remain accessible, like intl.cpl and timedate.cpl.

Are there GUI crutches to configuring and working with Server Core. Naturally. A quick Web search will show you a tool called Windows 2008 Server Core Configurator from CodePlex as one of those tools. And there are others.

But I tend to agree with Microsoft's Jones, who says, "Everyone seems to be in a rush to find crutches for people who don't like the command line. I'm not sure that we, as the experts, are doing people a favor in that regard: They're simply going to have to become more familiar with the CLI (whether via the [command prompt] or PowerShell) if they want to advance in this profession."

Where do you stand on this matter? Are you a CLI-hater, or are you one who embraces the new Server Core and PowerShell command-line interface?

Copyright © 2008 IDG Communications, Inc.

How to choose a low-code development platform