Windows Server 2016 – Core Configure Network

After installing Server 2016 core, it is important to configure network and/or at the server to a domain

First, run PowerShell and then get-netadapter.  You will get the list of the available network interfaces. Check the interface index ifindex for the network interface you want to configure. For our case is “5”

, <span>Windows Server 2016 – Core Configure Network</span>, KandZ

To change the IP address you need to use new-netipaddress with 4 parameters:

  • interfaceindex -the network interface index you want to change/setup
  • ipaddress -the new IP address
  • prefixlength – it is the subnet mask value. For example 24 is the same as 255.255.255.0
  • defaultgateway – the local router that the server will use to access other network

So for example we configure the NIC with index 5:

new-netipaddress -interfaceindex 5 -ipaddress 192.168.1.25 -prefixlength 24 -defaultgateway 192.168.1.1

See the picture below for the command and the result

, <span>Windows Server 2016 – Core Configure Network</span>, KandZ

If you want to configure DNS server address for the server use the set-DnsClientServerAddress:

set-DnsClientServerAddress -interfaceindex 5 -serverAddresses("192.168.1.1")

if you want to add the server to a Domain then you need to specify as the DNS server address the Domain’s IP address, if the DNS server is on the same Server.

, <span>Windows Server 2016 – Core Configure Network</span>, KandZ

If you want to add the server to a domain and rename it, then use Add-Computer command:

Add-Computer -domainname KANDZ.local -newName serverCore -Credential kandz\administrator

 

, <span>Windows Server 2016 – Core Configure Network</span>, KandZ

24480cookie-checkWindows Server 2016 – Core Configure NetworkWindows Server 2016 – Core Configure Network

Related posts

Leave a Comment