The
following sections cover general tasks associated with managing and
configuring a Server Core system after the installation is complete via
the command prompt. As an alternative, an administrator can use the
SCONFIG utility to configure general settings.
Launching the Command Prompt in a Server Core Installation
Remember, the Start menu does
not exist. Because of this, one of the most important tasks an
administrator must understand when managing a Server Core installation
is how to launch the command prompt. The following steps will assist
you:
1. | |
2. | Select Start Task Manager.
|
3. | On the Windows Task Manager screen, select File, then New Task (Run).
|
4. | In the Create New Task dialog box, type cmd.exe, and then click OK.
|
Changing the Server Core Administrator’s Password
After the initial password has been set, the syntax to change the administrator password is:
After the command has
been executed, you will be prompted to type a password for the user.
Enter the password and then retype it for the confirmation process. It
is a best practice to use a complex password when assigning passwords to
the administrator account.
Changing the Server Core Machine Name
After the Server Core
installation is complete, another common task is to change the machine
name of the server. By default, Windows automatically generates and
assigns a server name starting with WIN and followed by a string of
characters. The syntax to change the Server Core machine name follows:
netdom renamecomputer <ExistingComputerName> /newname:<NewComputerName>
When manipulating
this syntax, replace the <ExistingComputerName> argument with the
existing hostname (which can be found using the hostname command) and
the <NewComputerName> argument with the new machine name for the
Server Core installation. Changing the server name from Win-123 to
“ServerCore” is depicted in the following example:
netdom renamecomputer Win-123 /newname:ServerCore
Assigning a Static IPV4 IP Address and DNS Settings
Another common Server Core
management task is assigning an IP address, including the primary and
secondary DNS settings. Before this task can be executed, you must run
the following command to obtain and identify the names of the network
interfaces installed on the server. This includes capturing the unique
ID associated with each network interface. To display a list of network
interfaces, including their respective unique IDs, run the following
command:
netsh interface ipv4 show interfaces
The next step is to make a note
of the network interface name and unique ID that you must change. The ID
is located in the leftmost column and is referred to as Idx. This is
depicted in the output of the netsh interface ipv4 show interfaces
command, as displayed in Figure 1.
Note
If
you plan to change the IP address settings on more than one interface,
take note of all the interface names and Idx unique IDs.
Now that you have captured the names and IDs, utilize the following syntax to change the IP address for a desired interface.
netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP>
mask=<SubnetMask> gateway=<DefaultGateway>
Replace the ID argument
with the network interface name or ID. In addition, enter the static IP
address, subnet mask, and default gateway in subsequent arguments. An
example is netsh interface ipv4 set address name="1" source=static address=192.168.115.10 mask=255.255.255.0 gateway=192.168.115.1.
The final step when
configuring the network interface is to enter a primary and secondary
DNS entry for the interface. Do this by using the following syntax:
netsh interface ipv4 add dnsserver name="<ID>" address=<DNSIP>index=1
The same command is
utilized and repeated when entering more than one DNS entry. However,
increment the index each time. When finalized, run IP Config /all to
verify the IP address settings.
Adding the Server Core System to a Domain
The following script illustrates the basic syntax of how to add a Server Core system to a Windows domain:
Netdom join <computername> /domain:<domain> /userd:<domain>\<username> /password:*
Input the domain name and
supply the user account and password for an account that has permissions
to add computers to the domain.
Activating the Server Core System
Activating
a Server Core system can be achieved in two easy steps. The first step
includes entering a product key and the second step requires you to
activate the server. The syntax for entering a product key is as
follows:
slmgr.vbs -ipk<productkey>
Once the product key has been successfully entered, you activate the server by typing in the following command:
Server Core Roles and Feature Installations
The typical Windows
server roles can be configured on a Server Core installation. The
following bullets list the server roles that are currently supported on a
Server Core installation:
Active Directory Domain Services (AD DS)
Active Directory Lightweight Directory Services (AD LDS)
Active Directory Certificate Services
Dynamic Host Configuration Protocol (DHCP) Server
DNS Server
File Services
Print Server
Streaming Media Services
Web Server (IIS)
Hyper-V
The following are optional features that are also supported on a Server Core installation:
Microsoft Failover Cluster
Network Load Balancing
Subsystem for UNIX-based Applications
Windows Backup
Multipath I/O
Removable Storage Management
Windows Bitlocker Drive Encryption
Simple Network Management Protocol (SNMP)
Windows Internet Naming Service (WINS)
Telnet Client
Quality of Service (QoS)
.NET Framework
PowerShell
Note
The following command lists all of the potential server roles and associated features:
Dism /online /get-features /format:table
The OCSetup
command-line program is responsible for setting up and configuring the
server roles and features on a Server Core installation. You can
configure the OCSetup command-line options using the following syntax:
ocsetup.exe [/?] [/h] [/help] component [/log:file] [/norestart] [/passive]
[/quiet] [/unattendfile:file] [/uninstall] [/x: parameter]
Use Table 1 to understand each of the options that are available when using the OCSetup command-line program.
Table 1. Available Command Options for OCSetup
Parameter | Description |
---|
/?, /h, /help | Explains all the options available for OCSetup |
component | Represents the name of the component you plan on installing, such as DNS, DHCP, Web Server (IIS), and more |
/log:file | Specifies the log file location if you do not want to take advantage of the default location |
/norestart | Does not reboot the computer after the installation |
/passive | Suppresses unnecessary noise and only includes progress status |
/quiet | Does not require user interaction |
/unattendfile:file | Requires additional configurations |
/uninstall | Removes server components |
/x: parameter | Supplies additional configuration parameters |
Performing a Server Role Installation on a Server Core Installation
Table 2 outlines basic server role installation examples based on the use of the OCSetup command-line tool.
Table 2. Server Role Installation Command Lines with OCSetup
Server Role | Command |
---|
DNS Server role | ocsetup DNS-Server-Core-Role |
DHCP Server role | ocsetup DHCPServerCore |
File Server role | ocsetup FRS-Infrastructure |
Print Server role | ocsetup Printing-ServerCore-Role |
Active Directory Lightweight Directory Server role | ocsetup DirectoryServices-ADAM-ServerCore |
Windows Deployment Server (Windows DS) role | ocsetup Microsoft-Windows-Deployment-Services |
Web Server (IIS) role | ocsetup IIS-WebServerRole |
Streaming Media Services role | ocsetup MediaServer |
Hyper-V role | ocsetup Microsoft-Hyper-V |
The previous sections are a
prelude to some of the common Server Core command-line arguments for
installing and configuring elements on a Windows Server 2008 R2 Server
Core installation. For a full list of command-line arguments, visit the
Microsoft website and conduct a search for Windows Server 2008 R2 Server
Core.
Installing the Active Directory Domain Services Role
Even though Active Directory
Domain Services is just another server role, you cannot install it with
ocsetup on Server Core. You must use the dcpromo utility. The problem is
that dcpromo normally starts a wizard with a graphical user interface
and Server Core does not support GUIs. You have to provide the input for
dcpromo by supplying the operation parameters or by using an answer
file.
There are 40
different operation parameters that the dcpromo utility can accept.
While this may seem like a dizzying array of options, few command lines
will utilize all of them. Please refer to the TechNet dcpromo command
reference at http://technet.microsoft.com/en-us/library/cc732887(WS.10).aspx
for a complete list and explanation of each parameter. You can use this
reference to build the correct dcpromo command line or create an
unattend file suitable for your core domain controller.
The following example creates a
domain controller for a new Active Directory forest. It installs and
configures the DNS Server service and configures the forest and domain
functional levels to Windows Server 2008 R2:
[DCInstall]
; New forest promotion
ReplicaOrNewDomain=Domain
NewDomain=Forest
NewDomainDNSName=companyabc.com
ForestLevel=4
DomainNetbiosName=COMPANYABC
DomainLevel=4
InstallDNS=Yes
ConfirmGc=Yes
CreateDNSDelegation=No
DatabasePath="C:\Windows\NTDS"
LogPath="C:\Windows\NTDS"
SYSVOLPath="C:\Windows\SYSVOL"
; Set SafeModeAdminPassword to the correct value prior to using the unattend file
SafeModeAdminPassword=
; Run-time flags (optional)
RebootOnCompletion=Yes
Use the following steps to run dcpromo with an unattend file:
1. | Copy or create the unattend.txt file to the root of the C: drive.
|
2. | Enter the command dcpromo.exe /unattend:C:\unattend.txt and press Enter. The installation will proceed.
|
3. | At the end of the installation, the server will automatically reboot.
|