Working in Windows Server 2008 R2 Core Installation

Before you start

Objectives: The purpose of this article is to show you that almost all aspects of Core installations of Server 2008 R2 are managed by using Command Line Interface (CLI).

Key terms: command, run, core, oclist, ocsetup, start, features, file, task, server


Core Installation

When we log on to the core installation of Windows Server 2008 R2, we will only see a Command Line Interface (CLI). There is no Desktop, no icons, no Start Menu, etc. There are two commands that are commonly used in core installations, and those are “oclist” and “ocsetup”.

oclist

When we run the”oclist” command, we will see all available roles and features that are installed or not installed on the system. The list will be pretty long, so we will save the list in the text file (Core installation has Notepad installed). So, we will change our working directory with the “cd c:\” command, then use the “oclist > list.txt” command to list all features and save it to the list.txt file, and then simply open that file by using the “list.txt” command.

 1 oclist

oclist Command

The “>” is used to redirect the output of the command to the text file (to “pipe” it to the text file). Notice that now we can see all features and whether they are installed or not on the system. The oclist will show the exact names of the roles and features, and we must use that names when working with specific features in ocsetup.

ocsetup

Ocsetup tool is case sensitive, so keep that in mind when entering the names of roles and features. Let’s now use ocsetup to install some server role, for example – DNS. The exact name of that role is DNS-Server-Core-Role, so the whole command is: “ocsetup DNS-Server-Core-Role“.

 2 ocsetup

ocsetup Command

To verify that the role has been added we have to run the oclist command again. To check if the related service is running we can use the “sc query” command, which stands for “service config query”. If it is not running, we can start it with the “sc start dns” command. We should also ensure that it starts when we power on our computer. To do that we can enter the “sc config dns start= auto” command.

 6 Service Start Type

Service Auto Start

To manage the DNS itself we can use the “dnscmd” command. For example, to see current configuration we can enter: “dnscmd /info” command. We won’t go into configuration details now…

regedit

Another GUI tool that is still available in core installation is Registry Editor. We can run it from the command line by entering the “regedit” command.

4 regedit

regedit

timedate.cpl

Another GUI tool that is available is Date and Time. This applet can be used to configure date and time on the server. To run it, enter “timedate.cpl” in command line.

5 Time Date

Date and Time

Task Manager

To run the Task Manager we can enter CTRL+ALT+DEL, and then select the “Start Task Manager” option from the list. This is great to know, because we can run CMD from the Run menu in Task Manager, in case if we accidentally close the CMD window. To do that, go to File > New Task (Run) in Task Manager, and then enter “cmd”.

7 Run CMD

Run CMD