Managing Windows 2008 Server Core Server Roles

Last Update: Nov 19, 2024 | Published: Jan 07, 2009

SHARE ARTICLE

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. In Windows Server 2008, Server Core installation does not include the traditional full graphical user interface (GUI). Therefore, once you have configured the server, you can only manage it locally at a command prompt, or remotely using a Terminal Server connection. A third management option is to manage the server remotely using the Microsoft Management Console (MMC) or command-line tools that support remote use.

The following list is a compilation of some of the most useful commands allowing you to either locally or remotely manage a Server Core installation. You can use this as a quick reference guide, but as always, reading the full server help for a full guide.

List the available server roles and features

  1. 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.

Install the Active Directory Domain Services role

  1. To install the Active Directory Domain Services role type:
    ​dcpromo /unattend:

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

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 (which you need to manually create).

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

Install the Active Directory Lightweight Directory Services role

  1. To install the AD LDS role type:
    ​start /w ocsetup DirectoryServices-ADAM-ServerCore

    Note: Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed. Note: Uninstall the AD LDS role by typing the following at a command prompt:

    ​start /w ocsetup DirectoryServices-ADAM-ServerCore /uninstall

Install the DHCP Server role

  1. At a command prompt, type:
    ​start /w ocsetup DHCPServerCore

    Note: Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed.  

  2. Configure a DHCP scope at the command prompt by using netsh, or by remotely using the DHCP snap-in from Windows Server 2008.  
  3. If the DHCP server is installed in an Active Directory domain, you must authorize it in Active Directory. Note: 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. Note: Uninstall the DHCP Server role by typing the following at a command prompt:
    ​start /w ocsetup DHCPServerCore /uninstall

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

Install the DNS Server role

  1. 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.  

  2. Configure a DNS zone at the command prompt by typing dnscmd or by remotely using the DNS MMC snap-in. Note: Uninstall the DNS Server role by typing the following at a command prompt:
    ​start /w ocsetup DNS-Server-Core-Role /uninstall 

Install File Services role and features

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:

  1. For File Replication service, type the following at a command prompt:
    ​start /w ocsetup FRS-Infrastructure

    Note: Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed.  

  2. For Distributed File System service, type:
    ​start /w ocsetup DFSN-Server

     

  3. For Distributed File System Replication, type:
    ​start /w ocsetup DFSR-Infrastructure-ServerEdition

     

  4. 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.

Install Print Services role and features

  1. For the Print Server feature, type the following at a command prompt:
    ​start /w ocsetup Printing-ServerCore-Role

     

  2. For the Line Printer Daemon (LPD) service, type:
    ​start /w ocsetup Printing-LPDPrintService

Add a printer to the print server

  1. Determine the IP address or host name of the printer you want to connect to. You can usually obtain this information by looking at the printer’s test or printer configuration page.  
  2. Ping the printer from the print server in order to verify that the print server can communicate with the printer through the network.  
  3. On a remote computer running Windows Vista or Windows Server 2008, 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.

Install the Streaming Media Services role

  1. On another computer, download the Streaming Media Services role installer file from KB 934518  
  2. Copy installerfilename.msi to your Server Core installation.  
  3. Run installerfilename.msi.  
  4. At a command prompt, type:
    ​start /w ocsetup MediaServer

    Note: Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed.  

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

Summary

Server Core can be used to function in several roles (actually, 9 different roles). This article has showed you how to add, remove and configure these roles.

Recent Windows Server 2008 Forum threads

Got a question? Post it on our Windows Server 2008 forums!

SHARE ARTICLE