PowerShell for Windows Admins

Aug 31 2010   2:03PM GMT

WMI and Network Adapters: 3

Richard Siddaway Richard Siddaway Profile: Richard Siddaway


We have seen how to query WMI for information on network adapters.  But what we didn’t get was information about the addresses allocated to the NICs.  We need a different class for that

Get-WmiObject -Class Win32_NetworkAdapterConfiguration

However this gives us too much information as it includes all cards – we only want to see those with addresses

Get-WmiObject -Class Win32_NetworkAdapterConfiguration | where {$_.IPAddress}

Gives us the two NICs (on my machine that are live).

To just get the addresses

Get-WmiObject -Class Win32_NetworkAdapterConfiguration | where {$_.IPAddress} | Foreach { $_.Description; $_ | select -ExpandProperty IPAddress}

Gives a quick view of the addresses associated with each card

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: