24/7/365 Support

List Network Adapter Properties

Problem

You want to retrieve information about network adapters on a computer.

Solution

To retrieve information about network adapters on a computer, use the Win32_ NetworkAdapterConfiguration WMI class:

GetWmiObject Win32_NetworkAdapterConfiguration –Computer <ComputerName> To list only those with IP addresses assigned to them, use the WhereObject cmdlet to filter on the IpEnabled property:

PS >GetWmiObject Win32_NetworkAdapterConfiguration –Computer LEEDESK |

>> WhereObject { $_.IpEnabled }

>>

DHCPEnabled : True

IPAddress : {192.168.1.100}

DefaultIPGateway : {192.168.1.1}

DNSDomain : hsd1.wa.comcast.net.

ServiceName : USB_RNDIS

Description : Linksys WirelessG USB Network Adapter with SpeedBooste

r v2 Packet Scheduler Miniport

Index : 13

Discussion

The solution uses the Win32_NetworkAdapterConfiguration WMI class to retrieve information about network adapters on a given system. By default, PowerShell displays only the most important information about the network adapter but provides access to much more.

To see all information available, use the FormatList cmdlet, as shown in Example 247.

Example 247. Using the FormatList cmdlet to see detailed information about a network adapter

PS >$adapter = GetWmiObject Win32_NetworkAdapterConfiguration | >> WhereObject { $_.IpEnabled } >> PS >$adapter

Example 247. Using the FormatList cmdlet to see detailed information about a network adapter

DHCPEnabled : True IPAddress : {192.168.1.100} DefaultIPGateway : {192.168.1.1}

DNSDomain
: hsd1.wa.comcast.net.

ServiceName
: USB_RNDIS

Description
: Linksys WirelessG USB Network Adapter with SpeedBooste

r v2 Packet Scheduler Miniport

Index : 13

PS >$adapter | FormatList *

DHCPLeaseExpires Index Description

DHCPEnabled DHCPLeaseObtained DHCPServer DNSDomain DNSDomainSuffixSearchOrder DNSEnabledForWINSResolution DNSHostName DNSServerSearchOrder

: 20070521221927.000000420

: 13

: Linksys WirelessG USB Network Adapter with SpeedBooster v2 Packet Scheduler Minipor t

: True

: 20070520221927.000000420

: 192.168.1.1

: hsd1.wa.comcast.net.

:

: False

: LeeDesk

: {68.87.69.146, 68.87.85.98}

DomainDNSRegistrationEnabled : False

FullDNSRegistrationEnabled
: True

IPAddress
: {192.168.1.100}

IPConnectionMetric
: 25

IPEnabled
: True

IPFilterSecurityEnabled
: False

WINSEnableLMHostsLookup
: True

(...)

To retrieve specific properties, access as you would access properties on other PowerShell objects:

PS >$adapter.MacAddress 00:12:17:77:B4:EB

Help Category:

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say