Skip to content

Configure Windows Server 2016 Core with Powershell

In the past few weeks I’ve worked a lot with Windows Server 2016 Core, which as you might know, doesn’t have any GUI. You can do all the configurations (network configuration, domain join, rename computer, firewall settings, remote desktop settings) using sconfig or Powershell.

In this article, I’m going to walk you through the Powershell commands that you can use to configure your Windows Server Core.

Before starting any configuration, you might want to enable remote desktop on the server, instead of working on it via iDRAC (if it’s physical machine) or from the virtualization console.

To enable remote desktop use the command: Cscript %windir%\system32\SCRegEdit.wsf /ar 0.

Next, run the Get-NetAdapter command to identify the network card name so that you can configure it with the correct IP settings.

After that you can configure the IP settings using the following commands:

New-NetIpAddress -InterfaceAlias “NIC1” -IPAddress  -PrefixLength 24 -DefaultGateway

Set-DNSClientServerAddress -InterfaceAlias “NIC1” -ServerAddress

If your installation is on a physical computer you might also need to configure NIC Teaming, which can be done using the following command:

New-NetLbfoTeam -Name TeamTest NIC1,NIC2 -TeamingMode SwitchIndependent -LoadBalancingAlthorithm Dynamic

The following command will set the VLAN on the NIC Team:

Set-NetLbfoTeamNic -Team “TeamTest” -VLANID 100

Next you can check the Windows Firewall status using Get-NetFirewallProfile and you can disable it running Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False.

Now you can add your computer to domain and also rename it using the following commands:

Add-Computer -DomainName test.internal -Credential test\administrator

Rename-Computer -NewName Server01


Published inGeneral

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.