Executive Summary:
Server Core (Windows Server 2008's alternative OS installation) provides several command-line management options.
|
If you've taken the time to install Server CoreWindows Server 2008's alternative OS, with its lighter footprint and smaller attack surfaceyou've been struck by the return of the much loved/hated command line. I don't mean PowerShell (available in Server 2008 R2), but the old cmd.exe. As you dust off your DOS guides and refresh your memory about how to use the command line, you'll need to attend to several other important tasks as well.
First, you need to configure your Server Core system: Join the domain, and possibly change computer names, IP address configuration, firewall settings, Windows Update settings, and so on. Second, you need to enable the roles and features that you want to run under Server Core. Note that Server Core doesn't include Server Manager, so you'll have to use the OCList and OCSetup command-line tools. (For more information about configuring Server Core, see Top 10, "Essential Server Core Setup Commands.") Finally, you need to manage your Server Core system.
The five Server Core management techniques I present here include one local method and four remote methods. Only one of the methods uses a GUI consoleso get ready to re-embrace the command line.
1. Local Command Prompt
The easiest way to manage Server Core is to use the local command prompt (i.e., cmd.exe). If you prefer to use a GUI tool to configure Server Core, you can download the Server Core Configurator from www.codeplex.com/CoreConfig. You can use several GUI tools within Server Core as well, such as Notepad, Taskmgr (for Task Manager), Regedit (for the Registry Editor), timedate.cpl (for the Date and Time applet) and intl.cpl (for the Regional and Language Options applet).
For more information about configuring Server Core, including configuration commands, see Microsoft's "Server Core Installation Option of Windows Server 2008 Step-By-Step Guide." For information about specific commands, see the Microsoft TechNet A-Z command-line reference page. Finally, for videocasts about managing Server Core through Terminal Services, RemoteApp, Windows Remote Shell, and MMC snap-ins, see the bulleted list at the end of this article.
2. Terminal Services
If you use Terminal Services to manage Server Core, you're actually connecting remotely for administrative purposes, so you must edit the registry to enable the Remote Desktop for Administration feature. To enable Remote Desktop for Administration on a Server Core system, go to the command prompt and enter
Cscript c:\windows\system32\scregedit.wsf /ar 0
You should receive output indicating that the registry has been updated.
If the Server Core system has a firewall enabled, you need to open the RDP port to allow the connection. To open the RDP port, enter
netsh firewall add portopening TCP 3389 RDP
Once your Server Core system is set up, open the RDP connection from another system. A quick way to do accomplish this is to enter
mstsc.exe
in the Start menu's instant search bar. Then, enter the IP address (or the server name if DNS is configured) and provide the logon credentials. The remote desktop screen will open as a command prompt, with the blue desktop background.
The benefit of this type of connection over a RemoteApp connection (which I discuss in the next section) is that you can still run other applications outside of the command line on your remote desktop. When your work is complete, just enter
logoff
to close the connection.
3. Terminal Services with RemoteApp
Using an RDP connection to connect to the entire system might seem like overkillespecially if you only need the command prompt. Alternatively, you can use a new Server 2008 Terminal Services feature called RemoteApp. This feature lets you create an RDP connection that opens only the command prompt rather than the entire desktop. Before you begin, follow my previous instructions to enable Terminal Services connections.