Configure a Static IP Address using Powershell

Forums: 


Most servers are configured with a static IP address rather than having DHCP client enabled and receiving an IP address dynamically from a DHCP server. You can use the command below to configure the Internet Protocol version 4 (IPv4) properties of a network connection with a static IP address. Before running this command, ensure that you replace the example parameter values with values that are appropriate for your network.

New-NetIPAddress -IPAddress 10.0.0.2 -InterfaceAlias "Ethernet" -DefaultGateway 10.0.0.1 -AddressFamily IPv4 -PrefixLength 24