Home » PowerShell » This is not your father´s Windows Server: Setting up Server Core with PowerShell

This is not your father´s Windows Server: Setting up Server Core with PowerShell

This guide describes the basic configuration of Windows Server Core running Windows Server 2012 and Windows Server 2016.

The following configuration steps will work not only on Server Core, but also on a Windows Server with graphical interface. If you want to keep it simple, you can use sconfig to configure your Server Core: Windows Server 2016: sconfig. But in this article we configure Core with PowerShell.

First, install Server Core and login with administrative privileges.

Configuring Network Settings

The entire configuration is performed in PowerShell, so PowerShell must be started after login.


Afterwards, we have to find out the ID of the network adapter.


Now the IPv4 address and the default gateway can be configured with New-NetIPAddress.

New-NetIPAddress -IPAdress -PrefixLength 24 -DefaultGateway -InterfaceIndex 12 -AddressFamily IPv4


Check the settings with Get-NetIPConfiguration.



Next configure the DNS-Server with Set-DnsClientServerAddress.

Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses,


And check the DNS thing.

Get-DnsClientServerAddress -InterfaceIndex 12


Finally, test the IP Configuration with Test-Connection.



Use Rename-Computer to change the computername.

Rename-Computer server02

Next restart the computer by using Restart-Computer.


After restarting, start PowerShell again and quickly check the hostname with



Windows Server Activation

Run slmgr to activate your Windows Server. If you are using the Evaluation Version of Windows there is no need to activate.

slmgr -ato


Windows Updates

Automatic updates can be configured with cscript. Navigate to windows\system32 and run cscript to configure the automatic download and installation of Windows Updates.

cscript scregedit.wsf /AU 4

cscript scregedit.wsf /AU /v



To install printers, the role Print-Services must be installed.

Install-WindowsFeature Print-Services

Then run printui.exe / il and select the printer.

printui.exe /il 


Now just open Notepad, create a new file and try to print.

Get-Content C:\test.txt | Out-Printer


For installing drivers use pnputil.

Some examples:


Promote your Server Core to a Domain Controller

Server Core supports the promotion to a Domain Controller, which i described in the article: PowerShell: How to install a Domain Controller with Server Core

Hope you like it!

1 Comment

  1. […] To setup basic configuration with PowerShell see my article This is not your father´s Windows Server: Setting up Server Core with PowerShell. […]


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Who is the blogger?

My name is Patrick Grünauer (pewa2303). I am from Austria. On sid-500 I write about Windows, Cisco and IT-Security in English and German. Have fun while reading!

Patrick Gruenauer
Follow SID-500 on