Sergey Nivens - Fotolia


Configure a Server Core installation with the Server Configuration Tool

The Microsoft Server Configuration Tool configures several aspects of a Server Core installation in Windows Server 2012, Windows Server 2012 R2 and Windows Server 2016.

The Microsoft Server Configuration Tool, also known as Sconfig.cmd, is designed to configure a Server Core installation for Windows OSes. The Server Configuration Tool is still the primary tool in Windows Server 2016 for performing the initial configuration for a Server Core installation, though Microsoft has made many changes to it since the release of Windows Server 2012 R2. Using the Server Configuration Tool, you can complete initial configuration, which includes enabling Remote Desktop Protocol, changing the host name, configuring Windows update settings and restarting and shutting down servers (Figure A).

In order to use the Sconfig.cmd command-line tool you must be a member of the Administrators group.

Items to configure
To use Hyper-V Server Core, you must configure the following settings:

  • Change the host name of the server;
  • Join Server Core to a domain;
  • Set up Transmission Control Protocol (TCP)/Internet Protocol (IP) and domain name system (DNS) configuration;
  • Enable Remote Desktop Protocol (RDP);
  • Configure Remote Management;
  • Configure the Windows firewall to allow required incoming and outgoing traffic. For a Hyper-V host that acts as a Replica Server, you will need to configure Hyper-V Replica Server to accept incoming connections from the primary Hyper-V server;
  • Configure Windows Updates; and
  • Install the Hyper-V role.
Windows Server 2016 Server Core installation.
Figure A. Sconfig.cmd option in Windows Server 2016 Server Core installation.

First, change the host name of the Hyper-V Server Core according to the standard naming convention used in production. To change the host name of the server, type "2." Doing this will prompt you to enter a new host name. Type the name and then press Enter. You will then be asked to reboot the server. After this proceed with the remaining Server Configuration Tool configuration steps.

Once the server has rebooted, log on to Server Core using an administrator account and type Sconfig.cmd into the command line to proceed with the remaining configuration settings. Next, configure Server Core to be a part of a Workgroup or domain. To do this, type "1" and follow the steps shown on-screen.

I recommend assigning a static IP address to production servers. Although you can type "8" into the Server Configuration Tool menu to configure TCP/IP and DNS configuration settings, Microsoft also provides Network Adapter PowerShell cmdlets that you can use to configure TCP/IP and DNS on Server Core.

Although a Server Core installation requires minimum patching, you should enable Windows Update Settings to ensure all critical and required patches are applied to avoid any security risks. Windows Update Settings are configured to Download Only by default, which is a new option in Windows Server 2016. To configure Windows Update Settings, select option number "5" in the Server Configuration Tool menu and then select the required option for Windows Update Settings. You can configure Server Core to use Automatic or Manual updates setting. If you select the Automatic update option, Server Core will scan for updates at 3:00 AM and install updates automatically.

In order to use the Sconfig.cmd command-line tool you must be a member of the Administrators group.

Configure all firewall rules for Hyper-V Server Core with the Windows Firewall Microsoft Management Console (MMC) after enabling remote management. The Server Configuration Tool in Windows Server 2016 doesn't provide any options for configuring Windows firewall rules. If you're using a Hyper-V Server Core installation for testing purposes, execute the command shown below to disable the Windows firewall completely:

NetSh ADVFirewall Set AllProfiles State Off

Windows Server 2012 R2 and Windows Server 2016 OSes configure Windows firewall rules automatically when you install a role or feature. For example, when you install a Hyper-V server role on Server Core OS, the process will automatically configure Hyper-V firewall rules in Windows firewall. If you'd like to see which firewall rules have been configured on the Hyper-V Server Core, execute the following PowerShell command:

Get-NetFirewallRule | FT Name, DisplayGroup, Action, Direction, Enabled - AutoSize

Next, configure RDP in Server Core. To configure RDP in Server Core, select option number "7" and then choose any of the following settings: Enable RDP for Clients running RDP with Network Level Authentication, Enable RDP for Clients running any version of RDP or select Disable Remote. This final option, Disable Remote isn't recommended for production servers.

Note that RDP is disabled on all new installations of Server Core by default.

While RDP allows you to take control of a Server Core installation using a Remote Desktop Session, the Remote Management option helps you connect to Server Core using built-in tools, such as MMC, Remote PowerShell and Server Manager. You should enable all of the required options in order to manage a Server Core installation from a remote computer.

Once you've completed all the required steps highlighted above, you can install the Hyper-V role on Server Core by executing the command shown below:

Dism /Online /Enable-Feature /FeatureName:Microsoft-Hyper-V

You'll be asked to restart the server after the Hyper-V role is successfully installed. After restarting Hyper-V Server Core, you'll be able to create and manage Hyper-V Server Core by using the Hyper-V Manager from a remote computer that has the Hyper-V Remote Server Administration Tool installed.

Next Steps

Maintain control with server configuration tools

Everything you need to know about Windows Server 2016

How to build a free Hyper-V Server failover cluster

Dig Deeper on Microsoft Hyper-V management