Installing a server role on a server running a Server Core installation of Windows Server 2008: Overview
Installing a server role on a server running a Server Core installation of Windows Server 2008: 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 supports the following server roles:
Active Directory Domain Services (AD DS)
Active Directory Lightweight Directory Services (AD LDS)
DHCP Server
DNS Server
File Services
Hyper-V
Print Services
Streaming Media Services
Web Server (IIS)
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 Server Core installation
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.
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 or Windows Server 2008 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
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 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 does not support ASP.NET in Server Core installations of Windows Server 2008. Because there is no support for managed code, the following IIS features are not available in Server Core installations of Windows Server 2008:
IIS-ASPNET
IIS-NetFxExtensibility
IIS-ManagementConsole
IIS-ManagementService
IIS-LegacySnapIn
IIS-FTPManagement
WAS-NetFxEnvironment
WAS-ConfigurationAPI
Steps for installing a server role on a Server Core installation
To install a server role on a Server Core installation of Windows Server 2008, perform the procedure for the desired role as follows.
Note
Ocsetup.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:
oclist
This command lists the server roles and optional features that are available for use with Ocsetup.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:
start /w ocsetup DNS-Server-Core-Role
Note
Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed.
- Configure a DNS zone at the command prompt by typing dnscmd or by remotely using the DNS MMC snap-in.
Note
Typing start /w ocsetup DNS-Server-Core-Role /uninstall at the command prompt will uninstall the DNS Server role.
DHCP Server role
To install the DHCP Server role
At a command prompt, type:
start /w ocsetup DHCPServerCore
Configure a DHCP scope at the command prompt by using netsh, or by remotely using the DHCP snap-in from Windows Server 2008.
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 start /w ocsetup DHCPServerCore /uninstall 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:
start /w ocsetup FRS-Infrastructure
For Distributed File System service, type:
start /w ocsetup DFSN-Server
For Distributed File System Replication, type:
start /w ocsetup DFSR-Infrastructure-ServerEdition
For Services for Network File System (NFS), type:
start /w ocsetup ServerForNFS-Base
start /w ocsetup ClientForNFS-Base
Note
Uninstall any file server role options by using these commands with the /uninstall option.
Hyper-V role
To install the Hyper-V role, at a command prompt, type:
start /w ocsetup Microsoft-Hyper-V
To manage Hyper-V on a Server Core installation, use the Hyper-V management tools to manage the server remotely. These tools are available for Windows Server 2008 and Windows Vista Service Pack 1.
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. In Windows Server 2008 and Windows Vista Service Pack 1, you can download the tools from the following locations:
For 64-bit editions of Windows Vista with SP1, see https://go.microsoft.com/fwlink/?LinkId=123540.
For 32-bit editions of Windows Vista with SP1, see https://go.microsoft.com/fwlink/?LinkId=123541.
For 32-bit editions of Windows Server 2008, see https://go.microsoft.com/fwlink/?LinkId=123542.
Print Services role
To install Print Services role features
For the Print Server feature, type the following at a command prompt:
start /w ocsetup Printing-ServerCore-Role
For the Line Printer Daemon (LPD) service, type:
start /w ocsetup Printing-LPDPrintService
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 or Windows Server 2008, 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 Lightweight Directory Services role
To install the AD LDS role
At a command prompt, type:
start /w ocsetup DirectoryServices-ADAM-ServerCore
Note
Uninstall the AD LDS role by typing the following at a command prompt:
start /w ocsetup DirectoryServices-ADAM-ServerCore /uninstall
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.
Streaming Media Services role
To install the Streaming Media Services role
On another computer, download the Streaming Media Services role installer file from article 934518 in the Microsoft Knowledge Base (https://go.microsoft.com/fwlink/?LinkId=88046).
Copy the appropriate Microsoft Update Standalone package (.msu file) to your Server Core installation.
Run the .msu file.
At a command prompt, type:
start /w ocsetup MediaServer
On a different computer, use the Streaming Media Services MMC snap-in to remotely configure Streaming Media Services.
Web Server (IIS) role
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;WAS-WindowsActivationService;WAS-ProcessModel
For an installation that includes all of the options, 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
To uninstall the Web Server (IIS) role, use the following command:
start /w pkgmgr /uu:IIS-WebServerRole;WAS-WindowsActivationService;WAS-ProcessModel