Skip to content

Windows Server Core – Basics

On this page the brief background and basics of Windows Server Core will be explained. There will also be some command’s listed below that are often used on Windows Server Core.

Background on Windows Server Core and Nano

Section titled “Background on Windows Server Core and Nano”

Windows Server 2016 and later editions can be installed in different modes, mainly Desktop Experience (GUI), Server Core, and Nano Server.

  • Desktop Experience is the full GUI installation, easier for beginners but heavier in resource use and attack surface.
  • Server Core is the recommended edition for production: it removes the GUI, uses fewer resources, and reduces the attack surface. Administration happens via PowerShell, command line, sconfig.cmd, or remotely with RSAT/Server Manager. Almost all roles can be installed, including ADDS, RODC, DNS, DHCP, etc.
  • Nano Server (deprecated in later versions) was even smaller, designed for containers and cloud scenarios, managed only remotely. Now only available as a Docker image for applications like web servers.

Key configuration tasks on Server Core include:

  • Network setup with netsh or PowerShell.
  • Activation with slmgr.vbs.
  • Domain join with netdom or PowerShell.
  • Sysprep for SID regeneration, located at C:\Windows\System32\Sysprep.
  • mountvol for working with volume mount points.

Pros of Core – Less resources, smaller attack surface and less reboots needed.
Cons Core – Geen GUI maakt het moeilijker.
Server Roles on Core – Nearly all roles are available, with the exception of:

  • Remote Desktop Session Host (RDSH) in some versions.
  • GUI-dependant roles

RODC role on Core – It’s a best practice to run a Read Only Domain Controller on a Windows Server Core version.

Reboot a Core Server
shutdown /r /t 0
Syntax domain join – Command for a core server to join a doamin.
netdom join %computername% /domain:contoso.com /userd:Admin /passwordd:*
Remote Powershell management – Command to start a Powershell-session from a different device in the domain. Invoke-PSSession -ComputerName <hostname>

slmgr.vbs = Windows Script Host-tool voor licentiebeheer.

CommandoBetekenisFunctie
slmgr /ipk <key>Install Product KeyInstalls or replaces product keys in Windows.
slmgr /atoActivate OnlineActivates Windows or Office with the initialized product key over the internet or KMS.
slmgr /dlvDisplay License Information VerboseShows detailed license-information (status, type, KMS-data, activation-ID’s).

Controll command’s open components of the classic Controll Panel.

CommandoOnderdeelDoel
control timedate.cplDate and timeOpens the window fior timezone, time and internet-timesettings.
control intl.cplCountry or RegionOpens languange-, notation- and regional settings (like: currency and date-format)

Configures the networkstack (IP, DNS, firewall, etc.). Not only the interfaces, but broader. Show IP interfaces – Command to show interfaces and their settings.

netsh interface ipv4 show interfaces/config <id>

Configure IP-address – Commandto configure IP settings.

netsh interface ipv4 set address name=<id> source=static/dhcp address=<staticip> mask=<sub.mask> gateway=<ip>

Configure DNS – Commands to configure DNS servers for the different interfaces. Index = the order (primary (1), secundary (2), etc.).

netsh interface ipv4 add dnsserver name=<id> address=<IPDNS> index=<nr>

Open firewall port – Command to open up a firewall port for a (known) service (that knows ports).

netsh advfirewall firewall set rule group="windows remote management" new enable=yes

Enable firewall service – Command to enable the service (remotemanagement in this case) and listen where the port is now open.

netsh advfirewall set currentprofile settings remotemanagement
netsh advfirewall set allprofiles state on/off

Install features – Command to install the ADDS features with a PowerShell command.

Install-WindowsFeature AD-Domain-Services -IncludeManagementTools

Create a new domain – Command to create a new domain.

Install-ADDSForest -DomainName domainname

Promote a domain controller – Command to award a domain controller to a domain and with that promote it to a domain controller.

Install-ADDSDomainController -DomainName "domainname" -credential $(get-credential)

Install features – Command to install the DHCP feature with a PowerShell command.

Install-WindowsFeature -Name 'DHCP' -IncludeManagementTools

Create a new scope – Command to create a new DHCP scope.

Add-DhcpServerV4Scope -Name "DHCP Scope" -StartRange 192.168.1.150 -EndRange 192.168.1.200 -SubnetMask 255.255.255.0

Setup DHCP default settings – Commando to setup de default settings for the DHCP server.

Set-DhcpServerV4OptionValue -DnsServer 192.168.1.10 -Router 192.168.1.1

Setup DHCP lease duration – Command to setup the lease duration for a DHCP scope.

Set-DhcpServerv4Scope -ScopeId 192.168.1.10 -LeaseDuration 1.00:00:00

Mountvol is used to mount and unmount of volumes with GUID.
Mountvol number – This is not a number, but a Volume GUID (Globally Unique IDentifier). It is used to mount volumes to a path.
Mountvol /d – This removes the link between a volume and a mount point.


  • Show network config: netsh interface ip show config
  • Setup TCP/IP: netsh interface ip set address name="Ethernet0" static <IP> <MASK> <GW>
  • Setup DNS: netsh interface ip add dns name="Ethernet0" address=<DNS> index=1
  • Restart server: shutdown /r /t 0
  • Domain join: netdom join %computername% /domain:<domain> /userd:<user> /passwordd:*
  • Install ADDS: Install-WindowsFeature AD-Domain-Services
  • Activation: slmgr.vbs /ipk <key> and slmgr.vbs /ato
  • Sysprep: C:\Windows\System32\Sysprep\sysprep.exe
  • Mountvol: mountvol [Drive:]Path VolumeName devcon rescan diskpart > rescan > exit