Last Update: Nov 19, 2024 | Published: Jan 07, 2009
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.
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.
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.
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
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.
start /w ocsetup DHCPServerCore /uninstall
sc config dhcpserver start= auto
net start dhcpserver
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.
start /w ocsetup DNS-Server-Core-Role /uninstall
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:
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.
start /w ocsetup DFSN-Server
start /w ocsetup DFSR-Infrastructure-ServerEdition
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.
start /w ocsetup Printing-ServerCore-Role
start /w ocsetup Printing-LPDPrintService
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.
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.
Got a question? Post it on our Windows Server 2008 forums!