Tag: New-NetIPAddress

How to configure the network interface to use a dynamic IP address (DHCP) in PowerShell

Note: all settings in this article must be done with administrator rights. Dynamic Host Configuration Protocol (DHCP) allows the network adapter to obtain the correct network settings without manually configuring network interfaces. To manage a network interface, you need to know its index. The list of interfaces and their indices can be obtained with the following command: Get-NetIPAddress | Format-Table...

How to set IP address, netmask, default gateway and DNS for a network interface in PowerShell

Setting a static IP, netmask and gateway for a network adapter in PowerShell is a little confusing but possible. This post will show you how to do this using the New-NetIPAddress and Set-NetIPAddress cmdlets. The old way of configuring network interfaces is using the netsh command. First, we look at the name of the network interfaces of any of the...
Loading...
X