Installing a server role on a server running a Server Core installation of Windows Server 2008 R2: Overview

Applies To: Windows Server 2008 R2

Installing a server role on a server running a Server Core installation of Windows Server 2008 R2: Overview

After the Server Core installation is complete and the server is configured, you can install one or more server roles. The Server Core installation of Windows Server 2008 R2 supports the following server roles:

  • Active Directory Certificate Services

  • Active Directory Domain Services

  • Active Directory Lightweight Directory Services (AD LDS)

  • DHCP Server

  • DNS Server

  • File Services (including File Server Resource Manager)

  • Hyper-V

  • Streaming Media Services

  • Print and Document Services

  • Web Server (including a subset of ASP.NET)

More information about the command-line tools for configuring the server roles is available in the Additional references section at the end of this guide.

Note

This section includes a procedure for each server role in the previous list. You need to complete the procedure(s) for only the server roles that you want to install.

Prerequisites for installing a server role on a server running a Server Core installation of Windows Server 2008 R2

To complete this task, you need the following:

  • A computer on which you have installed and configured a Server Core installation of Windows Server 2008 R2.

  • An administrator user account and password for the server running the Server Core installation.

  • If installing and configuring a print server, another computer running Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2 on which you can run the Print Management Console to remotely configure the print server.

  • If installing and configuring a DHCP server, the information required to configure a DHCP scope.

  • If installing and configuring a DHCP server, you must configure the server running the Server Core installation to use a static IP address.

  • If installing and configuring a DNS server, the information required to configure a DNS zone.

  • If installing and configuring an Active Directory environment, the information required to either join an existing domain or to create a new domain.

  • If you are going to promote the server running the Server Core installation to be a domain controller in an Active Directory domain, a domain administrator user name and password.

Known issues for installing a server role on a Server Core installation of Windows Server 2008 R2

  • You cannot use the Active Directory Domain Controller Installation Wizard (Dcpromo.exe) on a server running Server Core installation. You must use an unattend file with Dcpromo.exe to install or remove the domain controller role.

    Alternately, you can run Dcpromo.exe on another computer running Windows Server 2008 R2 and use the wizard to save an unattend file that you can then use on the server running Server Core installation.

  • Dcpromo.exe will restart the computer immediately when the installation is complete or when Active Directory is removed unless RebootOnCompletion=No is included in the answer file.

  • The Web Server (IIS) role supports a subset of ASP.NET in Server Core installations of Windows Server 2008 R2. For a list of the IIS features available in Server Core installations of Windows Server 2008 R2, see Web Server (IIS) role.

Steps for installing a server role on a Server Core installation of Windows Server 2008 R2

Unlike Windows Server 2008, Server Core installations of Windows Server 2008 R2 use Dism.exe to install and uninstall most server roles. For more information about Dism.exe, see https://go.microsoft.com/fwlink/?LinkId=192466.

To install a server role on a Server Core installation of Windows Server 2008 R2, perform the procedure for the desired role as follows.

Note

Dism.exe syntax is case sensitive so be sure to follow the examples explicitly.

Available server roles

To discover the available server roles, open a command prompt and type the following:

Dism /online /get-features /format:table

This command lists the server roles and optional features that are available for use with Dism.exe. It also lists the server roles and optional features that are currently installed.

DNS Server role

To install the DNS Server role

  1. At a command prompt, type:

    Dism /online /enable-feature /featurename:DNS-Server-Core-Role

  2. Configure a DNS zone at the command prompt by typing dnscmd or by remotely using the DNS MMC snap-in.

Note

Typing Dism /online /disable-feature /featurename:DNS-Server-Core-Role at the command prompt will uninstall the DNS Server role.

DHCP Server role

To install the DHCP Server role

  1. At a command prompt, type:

    Dism /online /enable-feature /featurename:DHCPServerCore

  2. Configure a DHCP scope at the command prompt by using netsh, or by remotely using the DHCP snap-in from Windows Server 2008 R2.

  3. If the DHCP server is installed in an Active Directory domain, you must authorize it in Active Directory.

The DHCP Server service does not start automatically by default. Use the following procedure to configure it to start automatically and to start the service for the first time.

To configure and start the DHCP Server service

  1. At a command prompt, type:

    sc config dhcpserver start= auto

  2. Start the service by typing:

    net start dhcpserver

Note

Typing Dism /online /disable-feature /featurename:DHCPServerCore at the command prompt will uninstall the DHCP Server role.

File Services role

The Server service is installed by default to provide administrative share support for management tools. To install additional file server features use the following commands:

To install File Services role features

  • For File Replication Service, type the following at a command prompt:

    Dism /online /enable-feature /featurename:FRS-infrastructure

  • For Distributed File System service, type:

    Dism /online /enable-feature /featurename:DFSN-Server

  • For Distributed File System Replication, type:

    Dism /online /enable-feature /featurename: DFSR-Infrastructure-ServerEdition

  • For Services for Network File System (NFS), type:

    Dism /online /enable-feature /featurename:ServerForNFS-Base

    or:

    Dism /online /enable-feature /featurename:ClientForNFS-Base,

    depending on which you want to install.

Note

Uninstall any file server role options by using these commands with the /disable-feature option instead of the /enable-feature option.

Hyper-V role

To install the Hyper-V role, at a command prompt, type:

Dism /online /enable-feature /featurename:Microsoft-Hyper-V

To manage Hyper-V on a Server Core installation, use the Hyper-V management tools to manage the server remotely. In Windows Server 2008 R2 and Windows 7, the management tools are available as part of the Remote Server Administration Tools (RSAT) feature. For information about installing the RSAT feature for Windows 7, see https://go.microsoft.com/fwlink/?LinkId=192467.

In Windows Server 2008 and Windows Vista Service Pack 1, you can download the tools from the following locations:

Streaming Media Services role

To install the Streaming Media Services role

  1. On another computer, download the Streaming Media Services role installer file from article 963697 in the Microsoft Knowledge Base (https://go.microsoft.com/fwlink/?LinkId=188633).

  2. Copy the Microsoft Update Standalone package (.msu file) to your Server Core installation.

  3. Run the .msu file.

  4. At a command prompt, type:

    Dism /online /enable-feature /featurename:MediaServer

  5. On a different computer, use the Streaming Media Services MMC snap-in to remotely configure Streaming Media Services.

To install Print and Document Services role features

  • For the Print Server feature, type the following at a command prompt:

    Dism /online /enable-feature /featurename:Printing-ServerCore-Role

Note

For 32-bit Print Server support type the following at a command prompt:
Dism /online /enable-feature /featurename:Printing-ServerCore-Role-WOW64

  • For the Line Printer Daemon (LPD) service, type:

    Dism /online /enable-feature /featurename:Printing-LPDPrint-Service

To add a printer to the print server

  1. Determine the IP address or host name of the printer. This may be on the printer's test or printer configuration page or you might need to refer to the manufacturer's documentation for instructions.

  2. Verify that the print server can communicate with the printer through the network by pinging the printer from the print server.

  3. On another computer running Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2, open the Print Management console and add the server running the Server Core installation.

  4. Expand the entry for the print server running a Server Core installation, right-click Drivers, and then click Add Driver. The Add Printer Driver Wizard starts.

  5. Complete the wizard to install the printer driver for your printer.

  6. In the Print Management console, right-click Printers and then click Add Printer. The Network Printer Installation Wizard starts.

  7. Click Add a TCP/IP or Web Services printer by IP address or hostname and then click Next.

  8. Enter the printer's host name or IP address (the port name will be the same by default), and then click Next.

  9. Make any necessary changes to the printer name, contact information, or sharing status, and then click Next.

Active Directory Certificate Services

To install the AD CS role

  1. At a command prompt, type:

    Dism /online /enable-feature /featurename:CertificateServices

Note

Uninstall the AD CS role by typing the following at a command prompt:
Dism /online /disable-feature /featurename:CertificateServices

Active Directory Lightweight Directory Services role

To install the AD LDS role

  • At a command prompt, type:

    Dism /online /enable-feature /featurename:DirectoryServices-ADAM-ServerCore

Note

Uninstall the AD LDS role by typing the following at a command prompt:
Dism /online /disable-feature /featurename:DirectoryServices-ADAM-ServerCore

Active Directory Domain Services role

This command installs the Active Directory Domain Services role and promotes the server to a domain controller by using the settings in the unattend file.

For links to information about using an unattend file with Dcpromo.exe, see the Additional References section at the end of this document.

To install the Active Directory Domain Services role

  • At a command prompt, type:

    dcpromo /unattend:<unattendfile>

    Where unattendfile is the name of a Dcpromo.exe unattend file.

Note

Dcpromo.exe can also be used to demote a domain controller to a server.

Web Server (IIS) role

In Server Core installations of Windows Server 2008 R2, the following IIS features are now supported:

  • IIS-ASPNET

Note

This is the same IIS-ASPNET that is included in full installations of Windows Server 2008 R2. However, the Web Application Tool (WAT) is not available and you should use System.Net.Mail classes instead of System.Web.Mail classes.

  • IIS-NetFxExtensibility

  • IIS-ManagementService

  • IIS-PowerShellProvider

  • IIS-FTPExtensibility

  • IIS-WebDAV

  • WCF-HTTP-Activation

To install the Web Server role

  1. For the default installation, type the following at a command prompt and press ENTER:

  2. start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementScriptingTools;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-FTPPublishingService;IIS-FTPServer;WAS-WindowsActivationService;WAS-ProcessModel

Note

You can accomplish the same installation as the command above using Dism.exe, but you must add /featurename: in front of each package name. For example:
Dism /online /enable-feature /featurename:IIS-WebServerRole /featurename:IIS-WebServer /featurename:IIS-CommonHttpFeatures /featurename:IIS-StaticContent, and so on.

To install ASP.NET

  1. Type and run each of the following at a command prompt (in the order presented) and press ENTER after each one:

    Dism /online /enable-feature /featurename:WAS-NetFxEnvironment /featurename:IIS-ISAPIExtensions /featurename:IIS-ISAPIFilter /featurename:IIS-NetFxExtensibility /featurename:IIS-ASPNET

To install Windows PowerShell and the IIS snap-in

  1. Install Windows PowerShell by typing the following at a command prompt and pressing ENTER:

    Dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell

  2. Start Windows PowerShell by typing the following at a command prompt and pressing ENTER:

    \windows\system32\WindowsPowerShell\v1.0\powershell.exe

  3. Windows PowerShell opens. To import the IIS snap-in, type the following in Windows PowerShell:

    import-module WebAdministration

  4. Access the list of available IIS cmdlets by typing the following in Windows PowerShell:

    get-command –pssnapin WebAdministration

For more information about managing IIS with Windows PowerShell, see https://go.microsoft.com/fwlink/?LinkId=192468.

To enable remote IIS management

  1. Install the IIS management service by typing the following at a command prompt and pressing ENTER:

    Dism /online /enable-feature /featurename:IIS-ManagementService

  2. Enable remote management by using Regedit.exe to find the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server and change the value of EnableRemoteManagement to 1.

  3. Start the management service with the following command:

    net start wmsvc

You can now connect to IIS from a remote computer using IIS Remote Manager. For more information, see https://go.microsoft.com/fwlink/?LinkId=192469.

Note

To uninstall the Web Server (IIS) role, use the following command:
start /w pkgmgr /uu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel