Starting with Windows Server 2008, Microsoft brought new concept the Server Core, they suggested when the servers are only used to host applications and you generally do not have to do any other work on them, so why to waste their resources on unnecessary GUI. Its something like VW reducing 200 Kgs of weight off a 3 ton SUV and calling it more frugal and fuel-efficient. Anyway’s, I will keep my automobile passion off this article and will just talk about my latest encounter with a Windows 2008R2 Core.

Yes, despite of numerous servers I come across in my Day to Day life only very rare of them are Windows Server Core, The situation was very typical, this Windows 2008R2 Core was actually a Hyper V server, it had a couple of machines on it and one of the virtual’s was the ONLY Domain Controller of the very same domain of which this server was a Part. Yes this wasn’t the most perfect domain design which one can ask for.  Client was use to of managing HyperV from another Windows 2008R2 Member Server in same domain.

As it was destined the Domain controller running on this Hyper V crashed and the authentication for clients, including the admin access to the this Core server (using the domain admin account) wasn’t working.  At this situation I did quite a lot of research about various aspects of Managing or troubleshooting a Server Core, here is a crux of all that I found about managing Server Core

Facts about Server Core:

It’s a full fleshed server except that it doesn’t have a GUI

Most of its snap-ins can be connected remotely (From other Windows Servers) to manage this server like Hyper V Management Console, Computer management, Server Manager, Event Viewer , Services snap-in etc.

When we connect to Server Core (on console) it has two windows open by default one is blue and other is black

1) Blue Window: Its called as Sconfig, its command prompt window program with shortcuts to some basic tasks like domain/workgroup, Firewall etc

2) Black window: It’s the command prompt, all the usual DOS commands work here

Powershell can be started by typing powershell in the command prompt window

If you accidentally close the command prompt, you can start a new command prompt by following these steps:
1. Press Ctrl+Shift+Esc to display Task Manager.
2. On the Applications tab, click New Task.
3. In the Create New Task dialog box, type cmd in the Open field and then click OK.

Remote desktop can be enabled on Server Core and RDP will give us access to the same Black and Blue window like we have in Console session

A server installed as Core cannot be converted into a full GUI server and vice versa, However The latest Windows 2012 Server Core has an option to Convert itself into a basic GUI mode, refer this

Enabling Remote Desktop in Server Core

On the command prompt windows , execute the following command

Cscript %windir%\system32\SCRegEdit.wsf /ar 0” and press the “Enter” button.

Enable reduced security for RDP connections for client like XP/2003
Cscript %windows%\system32\scregedit.wsf /cs 0

Un-Join Server Core from a Non Existant Domain

netdom remove computername /Domain:domain /UserD:user /PasswordD:* /Force

To join it domain;

netdom join /domain:domain.local /userd:Administrator /passwordd:*

PS: /Force switch makes it disconnect from domain even if the domain controllers are not reachable. In regular cases when the DC is there, we should remove it from Sconfig or using this command without /Force switch

PS: Before you un-join the Server Core from domain make sure you know the password to the local Admin account, if not read further to find out how to reset the password or create an account.

Various stuff you can access in a Server Core

You can start Notepad and Regedit directly from a command prompt by enteringnotepad.exe or regedit.exe as appropriate. To open Control Panel, type intl.cpl.

While core-server installations support a limited set of roles and role services, you can install most features. The key exceptions are those that depend on the .NET Framework. Because the Microsoft .NET Framework is not supported in the original implementation, you cannot add features such as Windows PowerShell. And you can use Terminal Services to manage a core-server installation remotely.

Here is an overview of key commands and utilities you’ll use for managing server core installations while logged on locally:

intl.cpl-    open’s control Panel
Control desk.cpl – View or set display settings.
Control intl.cpl – View or set regional and language options, including formats and the keyboard layout.
Control sysdm.cpl – View or set system properties.
Control timedate.cpl – View or set the date, time, and time zone.
Cscript slmgr.vbs –ato – Activate the operating system.
DiskRaid.exe – Configure software RAID.
ipconfig /all – List information about the computer’s IP address configuration.
NetDom RenameComputer – Set the server’s name and domain membership.
OCList.exe – List roles, role services, and features.
OCSetup.exe – Add or remove roles, role services, and features.
PNPUtil.exe – Install or update hardware device drivers.
Sc query type=driver – List installed device drivers.
Scregedit.wsf – Configure the operating system. Use the /cli parameter to list available configuration areas.
ServerWerOptin.exe – Configure Windows Error Reporting.
SystemInfo – List the system configuration details.
WEVUtil.exe – View and search event logs.
Wmic datafile where name=“FullFilePath” get version – List a file’s version.
Wmic nicconfig index=9 call enabledhcp – Set the computer to use dynamic IP addressing rather than static IP addressing.
Wmic nicconfig index=9 call enablestatic(“IPAddress”), (“SubnetMask”) – Set a computer’s static IP address and network mask.
Wmic nicconfig index=9 call setgateways(“GatewayIPAddress”) – Set or change the default gateway.
Wmic product get name /value “ – List installed MSI applications by name.
Wmic product where name=“Name” call uninstall – Uninstall an MSI application.
Wmic qfe list – List installed updates and hotfixes.
Wusa.exe PatchName.msu /quiet – Apply an update or hotfix to the operating system.

Various commands for managing Server Core

Configure a Static IP Address on Server Core:
Netsh int ipv4 set address “Local Area Connection” static
Netsh int ipv4 set dnsserver “Local Area Connection” static primary
Netsh int ipv4 set winsserver “Local Area Connection” static primary

Configure a Dynamic (DHCP) IP Address on Server Core:
Netsh int ipv4 set address “Local Area Connection” source=dhcp

Disable firewall:
netsh firewall set opmode disable

Add User to a Local Group
net localgroup GroupName /add

Remove User from a Local Group
net localgroup GroupName /delete

Update User Passwords:
Net user [/domain] *

Configure for AutoUpdates:
cscript scregedit.wsf /AU /4

Disable AutoUpdates:

cscript scregedit.wsf /AU /1

View AutoUpdate Setting: 

cscript scregedit.wsf /AU /v

List Running Services:
sc query

Start and/or Stop a Service:
sc start
sc stop

Task Manager: (Ctrl+Shift+Esc)

Log off:
shutdown /l

Restart Now:

shutdown /r /t 0

Manage Disk Volumes: 

Diskpart /?

Test WMI on Server Core

There could be time when you are remotely not able to connect to WMI of server core with regular RPC or some other error. Such cases use the following scripts to test the WMI locally on Server Core

Open Notepad from command prompt on server core and save the following script in it as .vbs

set WMI = GetObject("WinMgmts:/root/cimv2") 
set obj = WMI.Get("Win32_WMISetting=@")  
WScript.Echo obj.GetObjectText_(0)

When you run the script, the WMI Core Settings are returned, including a listing of all the MOF Files, the Build Version, the location of the WMI Repository and other settings.  To test the provider host interface you could use a script similar to the one below:

set WMI = GetObject("WinMgmts:/root/cimv2")
set objs = WMI.InstancesOf("Win32_OperatingSystem")
for each obj in objs
WScript.Echo obj.GetObjectText_ 

Hope these commands will help you when you are banging head with your server Core and thinking why didn’t just installed it as a full server.

Incase you need further support, feel free to start a thread in our forum and we will try to help you as much as possible

The following two tabs change content below.
An automobile enthusiast at heart and computer geek by profession, started my Career with MS in 2005.Left Jobs and started Pledge Technologies (the parent company to Grishbi) back in 2009.We have been providing IT consulting to various Small and Medium businesses across US and UK since then.Our company specialises in Microsoft Server technologies like AD, Exchange, the rest and with numerous Office 365 migrations under our belt, we quite an expert with that too. Whatever we learn in our day to day life, we share it back on Grishbi as a Thank for all the love and support our customers have given us.
%d bloggers like this: