If you are running Server Core, here are instructions on how to configure the NIC’s TCP/IP network IPV4 properties using PowerShell.

First open PowerShell by typing PowerShell at the command prompt and pressing enter.

At the command prompt, type Get-NetIPAddress and press enter.

Look for the interface alias in the IPV4 adapter.

Type the New-NetIPAddress –interfaceAlias command and use the Interface Alias from the IPV4 adapter encapsulated between quotation marks.

New-NetIPAddress –InterfaceAlias “Ethernet” –PrefixLength 24 –DefaultGateway

You will be prompted to enter the IP address.

Once the IPV4 address has been set, use the following command to set the subnet mask and default gateway.

Note: -PrefixLength 24 is a /24 CIDR mask that indicates a class C subnet (subnet mask If you have a different subnet mask to use, you can easily calculate it here.

To configure DNS using PowerShell, execute the following command:

Set-DNSClientServerAddress –InterfaceAlias “Ethernet” –ServerAddress,

This will set your primary and secondary DNS IP addresses.

To remove an IP address, use the Remove-NetIPAddress command:

Leave a comment

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

error: Sorry, copy/paste is disabled
Skip to content