Home > Articles > Operating Systems, Server > Microsoft Servers

This chapter is from the book

This chapter is from the book

Managing and Configuring a Server Core Installation

The following sections cover general tasks associated with managing and configuring a Server Core system via the command prompt after the installation is complete. 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 a PowerShell console session. The following steps will assist you:

  1. Press Ctrl+Alt+Delete.
  2. Select Start Task Manager.
  3. On the Windows Task Manager screen, select File, New Task (Run).
  4. In the Create New Task dialog box, type powershell.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 as follows:

Net user administrator *

After the command has been executed, you are 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 and the default password policy on the server will require complex passwords.

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 <CurrentComputerName> /newname:<NewComputerName>

When executing this command, replace the <CurrentComputerName> 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 ABCDC2 is depicted in the following example:

netdom renamecomputer Win-123 /newname:ABCDC2

The same function can be performed using PowerShell with the following command:

Rename-computer –NewName ABCDC2

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

Figure 3.8

Figure 3.8. Reviewing the Idx ID for a network interface.

Now that you have captured the names and IDs, use 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, as follows:

netsh interface ipv4 set address name="1" source=static ad
dress=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 used 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.

The same function can be performed using PowerShell with the following commands:

Get-NETIPInterface
Set-NetIPAddress –InterfaceIndex 12 –IPv4Address 192.168.115.10 –PrefixLength 24
–DefaultGateway 192.168.115.1
Set-DNSClientServerAddress –InterfaceIndex 12 –ServerAddresses "DNSIP1","DNSIP2"

Adding the Server Core System to a Domain

The following script illustrates the basic syntax to add a Server Core system to a Windows domain:

Netdom join <computername> /domain:<domain> /OU:<ou path> /userd:<domain>\<username>
/passwordD:*

Input the domain name and the target OU. Supply the user account and password for an account that has permissions to add computers to the domain.

The same function can be performed using PowerShell with the following commands:

Add-Computer -domainname <domain> -OUPath "OU=OU,=Domain,DC=com"

Activating the Server Core System

Activating a Server Core system can be achieved in two easy steps. First, you enter a product key, and then you activate the server. The syntax to enter a product key is as follows:

slmgr.vbs –ipk<productkey>

After the product key has been successfully entered, you activate the server by typing in the following command.

slmgr.vbs –ato

Using SCONFIG to Configure a Server Core Installation

As mentioned previously, Windows Server 2012 includes a utility to make the initial configuration or a core installation easier. The SCONFIG utility, which has been available since Windows Server 2008 R2, is very easy to use and is usually the preferred configuration option if scripting is not required.

The utility can be executed by running sconfig.exe in the core installation command prompt and presents the set of options shown in Figure 3.9.

Figure 3.9

Figure 3.9. SCONFIG utility.

Server Core Roles and Feature Installations

The typical Windows server roles can be configured on a Server Core installation. The following server roles are currently supported on a Server Core installation:

  • Active Directory Certificate Services
  • Active Directory Domain Services (AD DS)
  • Active Directory Lightweight Directory Services (AD LDS)
  • Active Directory Rights Management Server
  • DHCP Server
  • DNS Server
  • File and Storage Services
  • Hyper-V
  • Print and Document Services
  • Remote Access Server
  • Remote Desktop Services (partial support)
    • Connection Broker
    • Licensing
    • Virtualization Host only
  • Volume Activation Services
  • Web Server (IIS)
  • Windows Deployment Services
  • Windows Software Update Services

The following are some of the features that are also supported on a Server Core installation:

  • .NET Framework 4.5
  • BITS Compact Server
  • BitLocker Drive Encryption
  • BranchCache
  • Failover Clustering
  • Group Policy Management
  • IP Address Management (IPAM) Server
  • Multipath I/O
  • Network Load Balancing
  • Remote Server Administration Tools (partial)
  • Simple Network Management Protocol (SNMP)
  • Telnet Client
  • Windows PowerShell 2.0
  • Windows Server Backup

The OCSetup command-line program familiar from earlier versions is still available (but deprecated) 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]

Table 3.3 describes each of the options that are available when using the OCSetup command-line program.

Table 3.3. 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

Using Powershell to Install a Server Role on a Server Core Installation

In addition to OCSetup, Powershell can be used to install roles and features, as follows:

  1. Run PowerShell by executing powershell.exe in the command prompt.
  2. Run import-module servermanager to enable Server Manager features within the PowerShell session.
  3. Use Get-WindowsFeature to identify installed and available roles and features.
  4. Use Add-WindowsFeature to add the required role or feature. Table 3.4 outlines an example of common server role installations using Add-WindowsFeature.

Table 3.4. Server Role Installation Command Lines with PowerShell

Server Role

Command

DNS Server role

Add-WindowsFeature DNS

DHCP Server role

Add-WindowsFeature DHCP

File Server role

Add-WindowsFeature File-Services

Print Server role

Add-WindowsFeature Print-Server

Active Directory Lightweight Directory Server role

Add-WindowsFeature ADLDS

Windows Server Update Services role

Add-WindowsFeature UpdateServices

Web Server (IIS) role

Add-WindowsFeature Web-Server

Remote Access role

Add-WindowsFeature RemoteAccess

Hyper-V role

Add-WindowsFeature 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 2012 Server Core installation. For a full list of command-line arguments, visit the Microsoft website and conduct a search for Windows Server 2012 Server Core.

Installing the Active Directory Domain Services Role

Installation of AD DS is more complex and vital to the operation of the environment and therefore deserves more detailed attention. Installation of the role using Add-WindowsFeature AD-domain-services will install the required binaries but not configure the server as a domain controller.

In earlier versions, the recommended tool for that is the dcpromo utility. The problem is that dcpromo normally starts a wizard with a GUI that is not supported on Server Core. As a result, the dcpromo utility on server core is a command-line utility that requires input by supplying the operation parameters or by using an answer file.

The dcpromo utility can accept more than 30 different operation parameters. Although this might seem like a dizzying array of options, few command lines will use all of them. 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.

As with many other aspects of the operating system, Windows Server 2012 provides PowerShell support to perform that same function. Promoting a domain controller using PowerShell is very convenient and is based on the ADDSDeployment module, which includes the following commands:

  • Install-ADDSForest
  • Install-ADDSDomain
  • Install-ADDSDomainController

These commands are available by first loading the appropriate module using Import-Module ADDSDeployment. Then, all that’s required is using the correct command from above depending on whether the goal is to deploy a new forest, add a domain to an existing forest, or add a domain controller to an existing domain. All the commands accept the required parameters, which you can discover by using the Get-Help cmdlet.

For example, use the following command to get the syntax for the Install-ADDSForest cmdlet:

Get-Help Install-ADDSForest

Then, using the following syntax to install a new Windows 2012 forest with a root domain called abc.com:

Install-ADDSForest –ForestMode "Win8" –DomainMode "Win8" –DomainName "abc.com"
–DomainNetBIOSName "ABC" –DatabasePath "C:\Windows\NTDS" –LogPath "C:\Windows\NTDS"
–SYSVOLPath "C:\Windows\SYSVOL" –InstallDNS:$true –CreateDNSDelegation:$false
–RebootOnCompletion:$true –Force:$true

You will be prompted for the safe mode boot password, and the forest will be created. The server reboots upon completion as specified in the command.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020