Tip

Overcoming Server Core installation woes in Windows Server 2012

Server Core is Microsoft's preferred method for installing Windows Server 2012. Although the idea of switching to Server Core intimidates some administrators, it's no longer as daunting as it used to be. Here's how to cope with the Server Core installation and transition.

Using the Windows Server 2012 GUI

In Windows Server 2008 R2, you couldn't switch between

    Requires Free Membership to View

Server Core and a full Windows Server deployment. Windows Server 2012, however, allows admins to enable and disable the graphical user interface (GUI) at will. This facilitates a Server Core installation, because it lets you start with a GUI and then remove it when the initial configuration completes.

There are a number of ways to enable or disable the GUI. One way is to disable it using Server Manager and re-enable it using the SCONFIG utility. But the easiest way is to use simple PowerShell commands. To remove the GUI, use the following command:

Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

To turn the GUI back on, use this similar command:

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Adding or removing the GUI requires you to reboot the server; you can initiate a reboot from PowerShell using the Shutdown –R –T 0 command.

Installing Windows 2012 server roles and features

Despite the fact that Server Core is the preferred deployment method for Windows Server 2012, a Server Core environment does not support all roles. It only supports the following roles:

  • Active Directory Certificate Services
  • Active Directory Domain Services
  • DHCP Server
  • DNS Server
  • File Services (including File Server Resource Manager)
  • Active Directory Lightweight Directory Services (AD LDS)
  • Hyper-V
  • Print and Document Services
  • Streaming Media Services
  • Web Server (including a subset of ASP.NET)
  • Windows Server Update Server
  • Active Directory Rights Management Server
  • Routing and Remote Access Serve
Use the Get-WindowsFeature command to install roles and features.

Installing these Server Core roles and any additional features is fairly simple using the Get-WindowsFeature command (Figure 1), which returns a list of roles and features. Make note of the role or feature's name (as listed in the Name column), and then install the feature using the Install-WindowsFeature command, followed by the name of the feature. For example, to configure the server to act as a DHCP server, use the following command:

Install-WindowsFeature DHCP

The Server Core interface

When you log into Server Core, a command prompt window displays by default. If you accidentally close this window, press Ctrl+Alt+Delete to launch the Task Manager to return to a command prompt.

Choose the Run New Task command from the File menu.

When the Task Manager opens, click on More Details and choose the Run New Task command from the File menu (Figure 2). At the prompt, enter CMD to launch a new command prompt window. As an alternative, you can type POWERSHELL to launch PowerShell.

Activating Windows Server 2012

Some Windows Server 2012 installations do not prompt the administrator to enter a product key as a part of the process. In such cases, enter the product key through PowerShell before Windows is activated. You can enter a product key using the following command:

Slmgr.vbs –ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

In the command, replace an x with the product key. Once the product key has been entered, activate Windows by entering the following command:

Slmgr.vbs –ato

This command may not display any output; this is normal. The absence of any command output indicates that Windows has been activated successfully.

Naming a Server Core deployment via PowerShell

Although Windows does assign a random name to Server Core deployments, it's helpful to assign a descriptive name using the following command:

Rename-Computer <computer name>

Reboot the machine for the new name to take effect.

Steps for assigning an IP address

Assigning a static IP address through PowerShell takes a little bit of work. The first step is to get the interface index number for the network adapter to which you want to assign the address. You can get this value using the Get-NetIPInterface command.

Once you know the interface index number, you can assign an IP address by entering the following command:

New-NetIPAddress –InterfaceIndex <the interface index value> -IPAddress <the address that you want to assign> -PrefixLength <the subnet mask entered as a prefix value> -DefaultGateway <the default gateway>

These are the commands used to assign an IP address.

You may also need to add a DNS server. Do this by using the following command (Figure 3):

Set-DNSClientServerAddress –InterfaceIndex <the interface index value> -ServerAddress <the IP address of the DNS server>

Working in a Server Core environment isn't difficult. If you have trouble with the initial Server Core installation and configuration, use the SCONFIG command to help you. You can also install the GUI, complete the configuration process and then remove the GUI.

About the author
Brien Posey is an eight-time Microsoft MVP for his work with Windows Server, IIS, Exchange Server and file system storage technologies. Brien has served as CIO for a nationwide chain of hospitals and health care facilities, and was once responsible for IT operations at Fort Knox. He has also served as a network administrator for some of the nation's largest insurance companies.

This was first published in February 2013

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.