Handling Server Core Roles and Features

Reading Time: 4 minutes

Server Core is proving to be a versatile infrastructure platform. After installing your basic Server Core installation, configuring network interfaces, activating, enable remote management (through RDP or WinRM) and changing the look and feel it might be time to install additional roles and optional features.



It's not just infrastructure roles you can install on Server Core… You can equip your Server Core box with a total of nine roles.Although not all roles are available after simply installing Windows Server 2008 in a Server Core fashion. (Some roles need to be downloaded first.)

For a complete overview of Server Roles look at the list of Server roles for Windows Server 2008 Server Core below:

Server Role Name Server Core Role Technical Name
Web Services (IIS) IIS-WebServerRole *
WAS-WindowsActivationService *
Print Services Printing-ServerCore-Role *
Hyper-V Hyper-V **
Active Directory Domain Services DirectoryServices-DomainController-ServerFoundation
Active Directory Lightweight Directory Services DirectoryServices-ADAM-ServerCore
DHCP Server DHCPServerCore
DNS Server DNS-Server-Core-Role
File Services enabled by default
Windows Media Services MediaServer **

* Contains subroles that can be installed separately
** Role components need to be downloaded first



Besides roles Server Core installations of Windows Server 2008 also allow the installations of sixteen features. It's not really clear what distinguish a role from a feature, but the fact DNS Server is a role and WINS Server is a feature made Mark Minassi believe features is the stuff Microsoft is embarrassed about. This is not the case and can be easily proven by summing up the list of Server Core installable features:

Feature Name Server Core Feature Technical Name
Bitlocker BitLocker
Bitlocker Remote Admin Tool BitLocker-RemoteAdminTool
Client for NFS ClientForNFS-Base
Server for NFS ServerForNFS-Base
Distributed File System Namespace Server DFSN-Server
Distributed File System Replication DFSR-Infrastructure-ServerEdition
File Replacement Replication Service FRS-Infrastructure
Removable Storage Management Microsoft-Windows-RemovableStorageManagementCore
Multipath IO MultipathIo
Network Load Balancing (NLB) NetworkLoadBalancingHeadlessServer
Quality of Service (QoS/qWAVE) QWAVE
Simple Network Management Protocol SNMP-SC
Subsystem for UNIX-based Applications SUACore
Telnet Client TelnetClient
Windows Server Backup WindowsServerBackup
Windows Internet Naming Service WINS-SC


Handling roles and features

Checking roles and / or features

One of Server Core's hidden gems is the oclist.exe program. As an administrator you can use it to see what roles and features you may install and what roles and features are installed. Simply run the following command on the console of your Server Core box:


As Andrew Mason shows here you can also pipe the output of the command. For instance if you don’t want to include all of the many IIS options in the output of oclist.exe, run:

oclist.exe | find “Installed” | find /v “IIS”

In the same fashion you can make oclist.exe display a mere list of Roles and Features that are installed, using the following command:

oclist.exe | find "Installed" | find /v "Not Installed" 


Installing roles and / or features

You'll find two commands to install a Role or a Feature: pkgmgr.exe and ocsetup.exe.

Both commands actually do the same thing in terms of installing a role or feature. One has more features than the other, but for the purpose of installing a role it makes no difference which command to use.

To install a role use one of the following commands:

start /w ocsetup.exe RoleOrFeatureName

start /w pkgmgr.exe -iu:RoleOrFeatureName

Where RoleOrFeatureName needs to be replaced with the Case sensitive (!) name of the Role or Feature you want to install.

Exception: Active Directory Domain Services

While you can install the Active Directory binaries to your hard disk by installing the Active Directory Directory Services Role, this will not result in a working Domain Controller. You need to run dcpromo.exe. More information here.


Removing roles and / or features

The previous two commands (pkgmgr.exe and ocsetup.exe) can also be used to remove a previously installed Role and / or Feature from your Server Core box.

To uninstall a role use one of the following commands:

start /w ocsetup.exe RoleOrFeatureName /uninstall

start /w pkgmgr.exe -uu:RoleOrFeatureName

Where RoleOrFeatureName needs to be replaced with the Case sensitive (!) name of the Role or Feature you want to uninstall.

Exception: Active Directory Domain Services

Uninstalling the DirectoryServices-DomainController-ServerFoundation Server Role from a Server Core Domain Controller will seriously cripple your installation to the extend where it won't boot normally anymore. Please use dcpromo.exe with appropriate command line switches.


Removing sources

Another great tip Andrew Mason shared publicly is how to use pkgmgr.exe to delete the local installation sources of the roles and features discussed above. This might get in handy when:

  • You want to free up some hard disk space on your server's hard disk
  • You strive to make your Server Core box the leanest and meanest server out there
  • You want to protect other system administrators against themselves by prohibiting them from installing roles and features they wouldn't understand anyway.

Highlevel steps

The highlevel steps to remove a source are:

  1. Run:

         start /w pkgmgr /up:SourceToRemove

    Where SourceToRemove is the Case sensitive (!) and architecture-dependent (!) name of the installation source you want to remove.

  2. Reboot (you can remove multiple packages before rebooting)
  3. Wait about 30 minutes for the disk cleanup to occur

Source names

The name of the installation sources are different than the names of the roles and include the architecture (x86 or amd64) and the version (6.0.6001.18000 for Windows Server 2008 RTM, other version numbers available here) in the following manner:


Where PackageDescription can be any of the following:



While removing sources sounds appealing you should be aware it cannot be undone. Once you remove a package for a Role or Feature you can only install the Role and/or Feature after a reinstall of the Operating System.


start /w pkgmgr /up: Microsoft-Windows-SUA-Core-Package~31bf3856ad364e35~amd64~~6.0.6001.18000




You can install 9 roles and 16 features, without even searching for the installation media.

If you're happy with your Server Core installation running some roles and some features, simply remove the sources of the other roles and features to make your server even leaner and meaner!

Further reading

Dcpromo Command-Line Options
Package Manager Command-Line Options
OCSetup Command-Line Options
Server Core: Reducing the Server Core disk footprint
Server Core: New Server Core Tips
Role Playing with Windows 2008 Server Core
Mark’s Windows 2008 DNS Server Command Line Cheat Sheet
Server Core Roles and Features of Windows Server 2008
Install a role on a Server Core Windows 2008
When Hyper-V on Server Core actually sucks
Server Core Roles & Features of Windows Server 2008
Server CORE Windows Server 2008 Setup Part 2 Installasi Server Role and Fitur
TechNet Forums – Demote or remove AD servcies role
TechNet Forums – Different web page list different server core server roles
TechNet Forums – The method to find the roles and features installed on a server core
TechNet Forums – Deciphering the oclist.exe output
TechNet Forums – Multiple Core Roles

leave your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.