Getting Started with Server Core - Installing Roles and Features

Server Core is a version of Windows Server 2008 that has a minimal Graphical User Interface (GUI).  I say minimal when most say command-line only because there are GUI tools available such as Notepad and Task Manager.  One thing that definitely doesn't run on Server Core is the Explorer process.  If you're unaware of what that process does, just end the explorer.exe process in Task Manager from your client and look what happens...don't freak out, all you need to do is then go back to Task Manager and select File -> New Task (Run...) and then type explorer.exe. 

The purpose of this article is to help you configure the Roles and Features of Server Core.

Server Core has a limited amount of roles that can be installed on it, which include:
  • Active Directory Domain Services (AD DS) 
  • AD Lightweight Directory Services (AD LDS) 
  • DNS Server 
  • Internet Information Services (IIS) (No ASP.NET support) 
  • DHCP Server 
  • File Services 
  • Print Services 
  • Streaming Media Services 
  • Hyper V 

Now that doesn't mean that Server Core can't do other things.  In fact it can, but Microsoft calls those other items Features and not Roles. Here is a list of the supported Features:
  • Microsoft Failover Cluster (not available in Standard Edition) 
  • Network Load Balancing 
  • Subsystem for UNIX-based applications 
  • Backup 
  • Multipath IO 
  • Removable Storage Management 
  • Bitlocker Drive Encryption 
  • Simple Network Management Protocol (SNMP) 
  • WINS 
  • Telnet 

To get the Roles and Features installed you are going to need to use the ocsetup.exe command.  The OC is short for Optional Components.  The most important thing to remember about this command is that IT IS CASE SENSITIVE!!! As a best practice you should always use the /w switch with ocsetup.exe as this will hold the Command Prompt from being active (when you can type again) until the setup is complete.  Below you will find a list of the commands that are required to install Roles and Features on Server Core.

DNS
start /w ocsetup DNS-Server-Core-Role

DHCP
start /w ocsetup DHCPServerCore

File Services (Server service is installed by default) but there are other role features

File Replication Service
start /w ocsetup FRS-Infrastructure

Distributed File System
start /w ocsetup DFSN-Server

Distributed File System Replication
start /w ocsetup DFSR-Infrastructure-ServerEdition

Services for Network File System (NFS)
start /w ocsetup ServerForNFS-Base
start /w ocsetup ClientForNFS-Base

Hyper V
start /w ocsetup Microsoft-Hyper-V

Print Server feature
start /w ocsetup Printing-ServerCore-Role

Line Printer Daemon (LPD) service
start /w ocsetup Printing-LPDPrintService

Active Directory Lightweight Directory Services
start /w ocsetup DirectoryServices-ADAM-ServerCore

Active Directory Domain Services
dcpromo /unattend:

Streaming Media Services 
Follow directions found in Article ID 934518

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

To uninstall IIS use the following command
start /w pkgmgr /uu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel

NOTE: If you need to uninstall a Role that you installed with ocsetup all you need to do is to append the commands above with /uninstall.


Now let's take a look at how we install Features on Server Core:

Microsoft Failover Clustering
start /w ocsetup FailoverCluster-Core 

Network Load Balancing
start /w ocsetup NetworkLoadBalancingHeadlessServer 

Subsystem for UNIX-based applications
start /w ocsetup SUACore 

Multipath IO
start /w ocsetup MultipathIo 

Removable Storage
start /w ocsetup Microsoft-Windows-RemovableStorageManagementCore 

Bitlocker Drive Encryption
start /w ocsetup BitLocker 

Backup
start /w ocsetup WindowsServerBackup 

Simple Network Management Protocol (SNMP)
start /w ocsetup SNMP-SC 

Windows Internet Name Service (WINS)
start /w ocsetup WINS-SC 

Telnet client
start /w ocsetup TelnetClient 

NOTE: If you need to uninstall a Feature that you installed with ocsetup all you need to do is to append the commands above with /uninstall.

Having the Role or Feature installed doesn't do much without going in and configuring the service.  The quick and easy way to manage these Roles and Features is to have either a dedicated Terminal Server have the AdminPak or Remote Server Administrative Tools (RSAT) installed or just install those same tools on XP or Vista. 

Take a look here (http://www.ronaksheth.in/knowledge-base/microsoft-windows/dnscmd-reference) for more info on how to manage DNS with DNSCMD and then head over here (http://msmvps.com/blogs/ad/archive/2008/05/07/installing-active-directory-on-server-core-with-an-answer-file.aspx) for installing Active Directory via an answer file on Server Core.