Gather NIC properties (including Speed and Duplex)

Gathering all sorts of server information with Powershell is rather easy, using the Get-WmiObject cmdlet.

In order to get NIC settings, the following little script returns a LOT of information:

$serverName = Read-Host “Enter server name”
$NicConfig = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $serverName
$NicConfig | Format-List *

The one thing I was missing though, is the value of the NIC Speed and Duplex. So I started to dig into the registry and found a way to discover these values. Continue reading