Set Windows Server Core 2016 IP Address Using PowerShell

Following my Windows Server Core 2016 Installation article from Yesterday, Today I’ll show you how I configure Windows Core 2016 IP Address And DNS using PowerShell.

In the example, below I’m using the Hyper-V console to setup the IP address.

The first step In the process Is to view the current configuration, reset it and remove the default gateway using the cmdlets below.

Remove-netipaddress -interfaceIndex 2
Remove-NetRoute –NextHop ""

Once done I’ll check again If the configuration Is clean.


To setup the IP address and Default Gateway I’m using the cmdlet below:

New-NetIPAddress -InterfaceIndex 2 -IPAddress -PrefixLength 24 -DefaultGateway

Next, I’ll setup the DNS Server address.

Set-DnsClientServerAddress -InterfaceIndex 2 -ServerAddresses ""