Question : Configure Server Core Postinstallation

Server Core is installed, and the command prompt is up, but where do you go from here? How do you make the necessary configuration changes to the system?

Answer : Configure Server Core Postinstallation

First, it may be comforting to know that there are some GUI tools you might be able to use. For example, type taskmgr, and you see the familiar Task Manager, which tells you how your server is doing. You can also use Notepad, although you might prefer to use one of the two Control Panel applets that are still available to you in GUI format. Type timedate.cpl (for the Date and Time applet) or intl.cpl (for the Regional and Language Options applet). These were allowed to stay in Server Core because they do not interfere with security, and they make configuring certain aspects of the OS easier.


If you accidentally close your command prompt, you can retrieve it by pressing Ctrl+Alt+Delete, choosing Task Manager, and then clicking File, Run and typing cmd.exe.

Configuration Commands

Now, what would you normally need to do to configure a traditional server? Most likely, the following would come to mind:

  • Changing the computer name

  • Configuring network interfaces

  • Joining the domain

  • Installing (and activating) the license key

  • Enabling the firewall

  • Installing roles and/or features

  • Adding hardware

  • Configuring Windows Update

To perform these tasks, you need to become familiar (or refamiliarize yourself) with the following commands:


For some of these commands to work, you might have to change your directory to c:\Windows\System32i.

Let’s look at how you might use these commands to make changes in Server Core.

To change the computer name, you would perform the following steps:

Locate the current name of the server by typing hostname or ipconfig.

Type netdom renamecomputer <ComputerName> /NewName <NewComputerName>.

Restart the computer, which you can do by using the shutdown command.

To make changes to the static IP settings on the server, you first need to identify your network interfaces. The netsh command is your friend in this case:

netsh interface ipv4 show interfaces

Make a note of the number in the Idx column for your network adapter(s). Then type the following:

Netsh interface ipv4 set address name="<Id>" source=static address=<the static IP you are setting> mask=<the subnet mask for that address> gateway=<the default gateway for that address>

If you want to use DHCP, you can type source=dhcp.

To configure your DNS settings, you need to perform an additional step with Netsh and type the following:

Netsh interface ipv4 add dnsserver name=<interface name> address=<DNS Server IP Address> index=1

where index is the interface number.

To join your domain you would type this:

Netdom join <Name of Your Computer> /domain:<Name of Your Domain> /userd:<UserName> /passwordd:*

Make sure to use a domain account that has permission in the domain to join computers to the domain. You can enter a password when you’re prompted for one.

Before you activate, you are going to want to make sure you put in a license key. You may have done this during the installation process, but if you didn’t, you need to now type the following:

Slmgr.vbs -ipk <License Key>

If you want to activate the server, you type the following:

Slmgr.vbs -ato

To configure the firewall, you use the netsh advfirewall command, although this takes a bit of work. A better method may be to take the Firewall snap-in from a system running Windows Vista or Windows Server 2008 and configure the settings remotely. However, you first need to enable remote management of the firewall by typing the following:

Netsh advfirewall set currentprofile settings remotemanagement enable

Moving on to the installation of hardware, you may find that simply plugging it in will work because the driver may be included with Windows Server 2008. If that is the case, you can install the hardware, and you are all set. If that is not the case, perform the following:

Copy the driver files to the Server Core system. To do this, from the command prompt type the following:

pnputil -i -a <Name of the INF file for the driver>


If your old DOS skills are a little rusty, it’s time to start shaking the dust off some of those DOS books in your library...or just do a quick search online for basic DOS commands, such as copy.

If you want to see a list of drivers on the system, type the following:

sc query type=driver

While there are many other configuration commands you might want to investigate and use, for now, use the following to enable automatic updates:

cscript scregedit.wsf /AU /4


The 4 in this command is to automatically download and install updates. There are other options in the GUI portion, and they are represented at the command prompt by other numbers; however, they don’t work with a Server Core server.


If configuring Server Core through the command line is not your cup of tea, you might consider searching for GUI alternatives. Several of them have been developed to make your life easier. One such tool, the Windows 2008 Server Core Configurator, is a collection of scripts that allows you to do all the tasks just discussed. You can locate this tool at

Install Roles and Features

While you may initially think of using Server Manager to install roles and features in Windows Server 2008, this console is not provided under Server Core. You therefore need to use the ocsetup.exe command.

The first thing you might want to do is see a list of the roles and features that are currently installed. To do this, simply type oclist.exe at the command prompt. Figure 1 shows the list that is returned.

Figure 1. Viewing a list of installed roles and features.

Using this list, you can now use the ocsetup.exe command to install roles and/or features by typing the following:

Start /w ocsetup "role/feature name"


The role/feature name is case-sensitive. See the list you pull up with ocsetup.exe for the correct role/feature name capitalization.

For example, if you want to install the DNS Server role, you type the following:

Start /w ocsetup DNS-Server-Core-Role


The /w prevents you from seeing the command prompt until the operation is complete. Therefore, if you see the command prompt, you know that the installation succeeded.


Installing Active Directory is a little different in Server Core than in Windows Server 2008. Much as in the full installation version of Windows Server 2008, you would still use dcpromo to install Active Directory. However, you cannot use the wizards as you would ordinarily do. Instead, you need to use an unattend file. Microsoft recommends that you run dcpromo on another server running Windows Server 2008 and create the unattend file for the installation. To install the role, you then type dcpromo /unattend:<filename>.

When you install Server Core, the Server service is installed by default, but there are additional file service features you might want to add, such as the following:

  • File Replication Service (FRS-Infrastructure)

  • Distributed File System service (DFSN-Server)

  • Distributed File System Replication (DFSR-Infrastructure-ServerEdition)

  • Services for Network File System (both ServerforNFS-Base and ClientForNFS-Base)

In addition to the roles you can install, Server Core supports the following optional features:

  • Failover clustering (FailoverCluster-Core)

  • Network load balancing (NetworkLoadBalancingHeadlessServer)

  • Subsystem for UNIX-based applications (SUACore)

  • Backup (WindowsServerBackup)

  • Multipath I/O (MultipathIo)

  • Removable storage (Microsoft-Windows-RemovableStorageManagementCore)

  • BitLocker drive encryption (BitLocker)

  • Simple Network Management Protocol (SNMP) (SNMP-SC)

  • Windows Internet Name Service (WINS) (WINS-SC)

  • Telnet client (TelnetClient)

Installing features is very similar to installing roles. In this case, you type Start /w ocsetup <feature> (remembering that the feature name is case-sensitive).

Random Solutions  
programming4us programming4us