Since windows 2008, server core has become a valuable option for deploying more secure and more stable windows servers. Although it is quite easy, many administrators avoid to deploy such solutions because they feel unsure on how to configure and manage such systems using windows CMD commands in the windows command prompt. The main idea is to set up the essential things of the system, like IP settings, firewall rules, domain membership; and use a management station to further monitor and manage your server.
Let’s take a look on how we can start using windows CMD commands to set up a windows 2012 server core environment. By default, in win12, remote desktop is disabled and you are probably going to need the ability to remotely connect to your server. So, to enable remote desktop:
To configure the IP settings of a server core system you can use the net shell (netSH) utility in the windows command prompt. But first, you need to identify your network interfaces.
To set the DNS server on interface “ethernet” of 172.16.1.10 as primary and 172.16.1.15 as secondary:
In windows 2012, windows remote management is enabled by default as opposed to previous windows OS. But there is a caveat: appropriate firewall rules are not, so access is blocked. But first things first, let’s take a look on how we can get the status of all the firewall profiles:
Before start making your life miserable, figuring out the netsh utility to manipulate firewall rules, you can use powershell instead of the windows command prompt. New to windows 2012 is a set of cmdlets that manipulate windows firewall:
The above commands have the same functionality as the netsh commands we checked previously. In case you are not using a pre-win12 core system, go for powershell instead of netsh. As I stated earlier, while winrm is enabled by default in Win12 systems, firewall rules are not.
To completely take advantage and manage your windows 2012 core system, go and download RSAT utilities from Microsoft download center and install it to a windows desktop machine. There forward, you can use server manager and various MMC snap-ins to connect and further configure your core system.
Instead of using windows CMD commands, you can configure many of the areas I explained earlier, by using a menu based utility called Sconfig; just type sconfig.exe in the windows command prompt of the server core system and configure the appropriate options:
New to windows 2012 is the ability to switch between different server modes even after Windows OS installation. Just by installing/un-installing specific windows features, you can switch between server core, MSI and full windows UI.
New to windows 2012 is the MSI mode. MSI contains basic UI functionality that can execute MMC snap-ins and server manager. You can manage such systems locally by using the windows command prompt, MMC and Server manager or remotely by using RSAT
This mode contains the Full UI functionality of the windows server system.
Did you notice the -source switch in the above definitions? If you have installed the Server Core system, the appropriate feature binaries are not present in your windows OS; so, you need the -source switch to direct feature installation process to use a source media (ex CDROM in D drive). By default, install.wim is in \sources directory of your windows setup media. To identify the correct index number of the windows OS version you want to use as a source reference, use the get-WindowsImage cmdlet in the powershell command prompt.