Posted by: Michael Khanin
For installing Server Roles & Features on Server Core we can use an OCSetup.exe (OptionalComponentsSetup). To identify all installable and/or installed roles and features we are using other tool, OClist.exe. However, at times some of those roles are not available by default (such as Hyper-V, …).
The Server Core installation option is a new option that we can use (i think it’s a best option) for installing Windows Server 2008.
A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack.
To achieve this, the Server Core installation option installs ONLY the subset of the binary files that are required by the supported server roles.
Right now, a server running Windows Server Core 2008 supports the following 9 server roles:
- Active Directory Domain Services (AD DS) using dcpromo.exe
- Active Directory Lightweight Directory Services (AD LDS)
- DHCP Server
- DNS Server
- File Services
- Print Services
- Streaming Media Services
- Web Server (IIS)
- Hyper-V (Windows Server Virtualisation)
As i said, all Server Core server roles can be installed via OCsetup.exe, just with one exception of the Active Directory Domain Controller role. AD is done by using dcpromo and the Web Server which is done through the PackageManager (PkgMgr.exe).
Installing a specific server role follows the syntax below:
start /w ocsetup <serverrole-name>
- Active Directory Domain Services (AD DS): dcpromo /unattend:<unattendfile.xml>
- Active Directory Lightweight Directory Services (AD LDS): start /w ocsetup DirectoryServices-ADAM-ServerCore
- DHCP Server: start /w ocsetup DHCPServerCore
- DNS Server: start /w ocsetup DNS-Server-Core-Role
- File Services: installed by default
- Print Services: start /w ocsetup Printing-ServerCore-Role
- Streaming Media Server: start /w ocsetup MediaServer (After copying the appropriate Microsoft Update Standalone package (.msu files) to your Server Core installation, and running the .msu file(s)).
- Web Server: start /w pkgmgr /iu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel
Streaming Media and Hyper-V (and may be other roles) might be missing when looking through the Optional Component list (via OClist.exe).
To add updates/roles/features to the list, use the following command: wusa <update>.msu /quiet
A typical example is the Streaming Media Server role, which only becomes available after copying the appropriate Microsoft Update Standalone package (.msu files) to your Server Core installation and running the .msu file(s).
Installing a specific feature follows the syntax below:
start /w ocsetup <feature-name>
start /w ocsetup BitLocker
start /w ocsetup BitLocker-RemoteAdminTool
start /w ocsetup FailoverCluster-Core
start /w ocsetup WINS-SC