Coming Soon: GET-IT: Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET Coming Soon: GET-IT: Endpoint Management 1-Day Conference on September 28th at 9:30 AM ET
Windows Server 2008

Reduce Your Windows 2008 Server Core Installation by ~200MB

In Windows Server 2008, Server Core installation does not include the traditional full graphical user interface (GUI). A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles. A server running a Server Core installation supports the following server roles:

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

Although Server Core is a lot smaller in size than a regular full-GUI Windows Server 2008 installation, the Server Core blog has recently written about an interesting way to further reduce this footprint by removing the server roles and optional features that you do not require from the disk. By doing so, you can free up more space. It is estimated that you will be able to free up as much as 200 MB of disk space if you remove all un-needed roles and features. This procedure could be used to prevent an administrator from adding a role or feature to a server that is supposed to perform a fixed function.

Warning: Removing a role or feature from the hard disk is irreversible. Once a role or feature is removed, the only option is to reinstall; there is no way to bring it back.

Sponsored Content

Say Goodbye to Traditional PC Lifecycle Management

Traditional IT tools, including Microsoft SCCM, Ghost Solution Suite, and KACE, often require considerable custom configurations by T3 technicians (an expensive and often elusive IT resource) to enable management of a hybrid onsite + remote workforce. In many cases, even with the best resources, organizations are finding that these on-premise tools simply cannot support remote endpoints consistently and reliably due to infrastructure limitations.

An even greater warning: Be very careful to comment out any line that has a role you’re currently running! If you run this script on a Windows Server 2008 machine that already has that specifc role installed, this will remove it completely and render the machine useless…

To remove roles or features from a Server Core installation please follow these steps:

1. Run the following command in the command prompt window:

pkgmgr /up:<package to remove>

2. Reboot the server.  Note that it is possible to remove multiple packages before having to reboot.

3. Wait approx 30 minutes for the disk cleanup. This is important.

You will then notice:

  • the disk space used by the role or feature is freed up
  • oclist doesn’t show the role or feature as being available
  • trying to install using ocsetup results in an error

The removeable role and feature packages are:

Note: If running on an x86 server, change amd64 below to x86. The names themselves are pretty self-descriptive, but are also CASE SENSITIVE!

  • Microsoft-Hyper-V-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-BLB-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DFSN-ServerCore~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DFSR-ServerEdition-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DhcpServerCore-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DirectoryServices-ADAM-SrvFnd-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DirectoryServices-DomainController-SrvFnd-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-DNS-Server-Core-Role-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-FailoverCluster-Core-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-FileReplication-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-IIS-WebServer-Core-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-Internet-Naming-Service-SC-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-MultipathIo-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-NetworkLoadBalancingHeadlessServer-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-NFS-ServerFoundation-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-Printing-ServerCore-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-QWAVE-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-RemovableStorageManagementCore-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-SecureStartup-OC-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-SNMP-SC-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-SUA-Core-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-Telnet-Client-Package~31bf3856ad364e35~amd64~~6.0.6001.18000

You can also remove fonts and IME support to further reduce the server’s footprint by removing the following packages: In order to do that, you need to remove the following packages:

  • Microsoft-Windows-ServerCore-EA-Fonts-Package~31bf3856ad364e35~amd64~~6.0.6001.18000
  • Microsoft-Windows-ServerCore-EA-IME-Package~31bf3856ad364e35~amd64~~6.0.6001.18000

Interesting stuff. Proceed with caution, and remember, never remove a role or feature that you actually need!

Related Links:

Server Core:

Related Topics:

Live Webinar: Active Directory Security: What Needs Immediate Priority!Live on Tuesday, October 12th at 1 PM ET

Attacks on Active Directory are at an all-time high. Companies that are not taking heed are being punished, both monetarily and with loss of production.

In this webinar, you will learn:

  • How to prioritize vulnerability management
  • What attackers are leveraging to breach organizations
  • Where Active Directory security needs immediate attention
  • Overall strategy to secure your environment and keep it secured

Sponsored by: