Server Core is Microsoft's preferred method for installing Windows Server 2012. Although the idea of switching...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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 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)
- 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
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:
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.
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:
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>
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.