With the exception of the Active Directory
Domain Services role, you install server roles
and features by using the ocsetup command.
To list the server roles and features currently
installed, run the oclist command. The syntax for ocsetup is the same for both roles and features.
The ocsetup command-line tool is case sensitive,
but you can get the correct capitalization
for a server role or feature from the output of the
oclist command (which Figure 4 shows). The
following command installs Windows Backup:
start /w ocsetup
WindowsServerBackup
Using the /w switch with the start command
gives the user an indication of when ocsetup
has finished installing the new role or feature
by preventing further input at the command
prompt until installation is complete. It also
stops the user from running another command
while ocsetup in running.
To promote Server Core to a DC, you need
to generate an unattended .txt file on a full version
of Server 2008 and then run dcpromo as
shown below on Server Core:
dcpromo
/unattend:
Other Ways to Administer
Server Core
As if these weren’t enough ways to administer
Server Core remotely, you can make use of
Windows Remote Shell (WinRS) in Vista. The
WinRS client passes commands to a WinRS
listener on Server Core, which in turn passes
the commands to a prompt, captures the
output, and passes it back to the WinRS client. To configure WinRS on Server Core, run the
following command:
winrm quickconfig
This command will prompt you to perform a
couple WinRS configuration steps.
Below is an example of a command being
run against Server Core remotely by using
WinRS. You should note that this command
line is for a machine that’s a DC or domain
member:
winrs -r:http://<servername>
ipconfig
The one big disadvantage of WinRS is that it
can’t run commands interactively.
You can also use administration tools such
as the Windows Management Instrumentation
command line (WMIC) and PowerShell
by means of WMI calls to manage Server Core.
Unfortunately, Server Core doesn’t support
PowerShell directly at the time of writing (as
of Server Core RC0) because PowerShell relies
on the .NET Framework. Hopefully, both will
be supported in a future release.
Activate Automatic
Updating
You can activate automatic updating on Server
Core by using scregedit to modify the registry
and then restarting the Windows Update service,
as follows:
cscript c:\windows\system32\
scregedit.wsf /au 4
net stop wuauserv
net start wuauserv
As of Server Core RC0, scregedit with the /au 4
switch sets the time for checking updates to the
default of 3 a.m. In Server 2008, /au 4 also reboots
the server automatically if the updates require it.
You can disable automatic updating by using the
/au 1 switch and then restarting the Windows
Update service. To check the value set for /au,
use the /au and /v switches in sequence.
To force an immediate check for updates, you can use the wuauclt command as follows:
wuauclt /detectnow
Run Antivirus and Other
Applications
Windows Installer is supported on Server Core,
so you can use the msiexec command to install
antivirus and other third-party applications if
required. (And who wants to run a server without
proper antivirus and backup software these
days?) Before you deploy any such solution,
though, you should check that it’s officially
supported on Server Core by contacting the
vendor.
You can run at least two Windows-based
applications from the console: notepad and
regedit. These are useful tools, but I found it
a little odd to be able to run regedit but not
dcpromo, with its simple GUI.
Potential Not Yet Fully
Realized
One of the biggest potential uses for Server
Core—as a Web server—is unlikely to be
realized with the current incarnation of the
product due to its lack of support for the .NET
Framework. Other uses, although limited,
could be practical in situations that don’t
require frequent changes to server configuration,
such as an RODC. Given the trend
towards virtualization, Server Core and the
hypervisor feature in Server 2008 (a software
virtualization layer that sits between the hardware
and the OS) together could prove to be
one of the “must have” features of the next
generation Windows Server.
The lack of a GUI in Server Core needn’t be
a disadvantage. Once the basic configuration
has been completed, most other settings can
be either pushed out automatically by using
Group Policy if the server is part of a domain or
by using MMC snap-ins on a remote machine.
PowerShell is noticeable by its absence, considering
it’s Microsoft’s latest solution for managing
Windows from the command line. It’s slated for
inclusion in future versions of the product.
Despite some of the shortcomings of
Server Core, the ability to run Windows
with a significantly reduced footprint has the
potential to give substantial improvements
in security, capacity for virtualization, and
performance.