An Engineers Notebook

Setting IP Configuration via PowerShell

1. Identify the Interface Index of the NIC you want to configure.


2. Set the IP address on the desired interface

New-NetIPAddress -InterfaceIndex 4 -IPAddress –PrefixLength 24 -DefaultGateway

3. Finally, set the DNS addresses

Set-DnsClientServerAddress -InterfaceIndex 4 -ServerAddresses ("","")

How do we know this worked?


Leave a Reply

Your email address will not be published.