Setting up Windows Server 2008 Server Core

Windows Server 2008 CoreWindows Server 2008 comes with a neet server core installation mode. This is a stripped down version of the OS where all graphics and lot of  applications are removed. If you’ve been working with Linux systems parallel with Windows you have probably experienced that the less Windows the better. If you do need to run Windows, this is probably the best alternative.

The server core version supports the following roles:

  • Active Directory Domain Services (AD DS)
  • Active Directory Certificate Services (AD CS)
  • Active Directory Lightweight Directory Services (AD LDS)
  • DHCP Server
  • DNS Server
  • File Services
  • Print Services
  • Streaming Media Services
  • Internet Information Services (IIS)
  • Hyper-V

In this example we will be installing the Standard version and configure the role of IIS (Web server).

The basic installation process is too simple to care to document so I assume you have put the CD in and installed Windows Server 2008 Standard Server Core. I’m using the 64 bit version and I’m running it in a virtulization environment (XenServer).

Well, the server core does have some graphic tools installed such as notepad and task manager. We’ll get back to these. To get started we will configure the network.

Configure Network

First we’ll set the IP-address:

netsh interface ipv4 show interfaces

Note the idx of the interface you’d like to set up as your network interface.

netsh interface ipv4 set address name="2" source=static address= mask= gateway=

name = the idx from above (or the actual name of the connection like “Local Area Connection”)
address = the static IP
mask = network mask
gateway = gateway

To use DHCP instead of static IP:

netsh interface ipv4 set address name=”2” source=dhcp

Next you’ll want to set up DNS servers:

netsh interface ipv4 add dnsserver name="2" address=

When these are done we run ipconfig /all to check if everything looks good.


To make the server a web server running IIS we need to configure the role of Internet Information Server (IIS). We’ll install the minimal version of IIS running the following commands:

start /w ocsetup IIS-WebServerRole
start /w ocsetup WAS-WindowsActivationService
start /w ocsetup WAS-ProcessModel


start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel

The /w makes the command line wait for the process to finish before returning. Without this you’ll get an error if you try to run the next command due to an installation already in progress.

As I want several features of IIS I will run this:

start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel;IIS-FTPPublishingService;IIS-FTPServer;IIS-ASP;IIS-CustomLogging

In terms of features IIS is quite big.. To get a complete list of available features run:


Remote Desktop

As you might be sitting freezing in your server center right now, first I’ll say virtualize your server =) You might have reasons not to do that so I’ll get to the point..

cscript c:\windows\system32\scregedit.wsf /AR 0

For some reason this only enables Windows Vista and later to connect.. To enable Windows XP:

cscript c:\windows\system32\scregedit.wsf /CS 0


Don’t wait to long doing this if your server is online..

Automatic updates is high risk if you depend on the servers uptime. Updates may cause the system to function differently and it helps to know when the update was made. If you’re managing a large amount of servers you don’t want the same mistake to be made to all your servers when you’re asleep or on vacation. As I don’t trust automatic updates, I prefer to disable them:

cscript c:\windows\system32\scregedit.wsf /AU 1

..and verify..

cscript c:\windows\system32\scregedit.wsf /AU /v

NB! If you do this you need to remember to run updates yourself at least once a month (the second Thursday each month if I remember correctly). If you trust Microsoft more than your own recollection you may want to consider automatic updates (3 AM every day):

cscript c:\windows\system32\scregedit.wsf /AU 4

We do need to install updates, but the balloon notification is obviously not available in the server core UI. Thanks to Robert Larson I came across this VBScript which checks and installs updates. The easiest way to get this script to the server is connecting to remote desktop. I stored the script in C:\Program Files\Scripts\winupdate.vbs, but obviously you can put it where ever you like.

In my case it’ll run like this:

cscript "c:\Program Files\Scripts\winupdate.vbs"

This might take a while if it’s the first time or if you’ve been naughty and forgot to run it for some time.. It’s a fine script and a complete must if you’re not running automatic updates.

Review the selected updates if you care and accept if you dare (or don’t dare not to.. err..).

When you’ve finished installing updates you usually have to reboot:

shutdown /r /t 0


If you’re like me you tend to type exit when you’re done in the command line. That’s a bad idea in server core as the command line window is all you have. The command prompt will be gone and the entire view is blue.. I’m sure there’s a smart-ass shortcut to get it back, but this also works:

To get the command prompt back: CTRL+ALT+Delete -> Start Task Manager -> New Task… -> “cmd” -> Enter

Useful references

Quickreference commands

Another quickreference

Getting started guide

  1. No comments yet.

  1. No trackbacks yet.