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:
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.
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 http://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
-
At a command prompt, type:
Dism /online /enable-feature /featurename:DNS-Server-Core-Role
-
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
-
At a command prompt, type:
Dism /online /enable-feature /featurename:DHCPServerCore
-
Configure a DHCP scope at the command prompt by using netsh, or by remotely using the DHCP snap-in from Windows Server 2008 R2.
-
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
-
At a command prompt, type:
sc config dhcpserver start= auto
-
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 http://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
-
On another computer, download the Streaming Media Services role installer file from article 963697 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?LinkId=188633).
-
Copy the Microsoft Update Standalone package (.msu file) to your Server Core installation.
-
Run the .msu file.
-
At a command prompt, type:
Dism /online /enable-feature /featurename:MediaServer
-
On a different computer, use the Streaming Media Services MMC snap-in to remotely configure Streaming Media Services.
Print and Document Services role
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
-
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.
-
Verify that the print server can communicate with the printer through the network by pinging the printer from the print server.
-
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.
-
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.
-
Complete the wizard to install the printer driver for your printer.
-
In the Print Management console, right-click Printers and then click Add Printer. The Network Printer Installation Wizard starts.
-
Click Add a TCP/IP or Web Services printer by IP address or hostname and then click Next.
-
Enter the printer's host name or IP address (the port name will be the same by default), and then click Next.
-
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
-
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
-
For the default installation, type the following at a command prompt and press ENTER:
-
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
-
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
-
Install Windows PowerShell by typing the following at a command prompt and pressing ENTER:
Dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell
-
Start Windows PowerShell by typing the following at a command prompt and pressing ENTER:
\windows\system32\WindowsPowerShell\v1.0\powershell.exe
-
Windows PowerShell opens. To import the IIS snap-in, type the following in Windows PowerShell:
import-module WebAdministration
-
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 http://go.microsoft.com/fwlink/?LinkId=192468.
To enable remote IIS management
-
Install the IIS management service by typing the following at a command prompt and pressing ENTER:
Dism /online /enable-feature /featurename:IIS-ManagementService
-
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.
-
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 http://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 |