Dual NIC install & static IP config in PowerShell

This video shows a quick (3 min) installation of an Intel dual NIC into a PC. Then it spends 15 min on the PowerShell (5.1) commands used to rename the network adapters and configure TCP/IP. Sorry for the low audio quality in this one! Commands are below.

3479

Find out the PowerShell version: (I’m using 5.1 in this video)

$psversiontable

 

Show the networking devices in the system:

Get-pnpdevice -class 'net'

 

Rename a network adapter:

Rename-NetAdapter -Name "Current connection name" -NewName "New connection name"

 

Set a static IP address:

Netsh interface ip set address "connection name" static <IPv4 address> <IPv4 mask> <gateway>

 

Set a DNS server IP address:

netsh interface ip add dns "connection name" <DNS server IP>