20.8. The Network Configuration

Network adapters are just another type of hardware with corresponding WMI objects that we can use to our advantage. To get information about the hardware device, we can query the Win32_NetworkAdapter objects on our system. Here is how the default view of my VIA Rhine II-compatible network adapter looks:

PS> gwmi Win32_NetworkAdapter -filter "Name LIKE 'VIA Rhine%'"


ServiceName      : FETNDIS
MACAddress       : 00:08:A1:93:10:9A
AdapterType      : Ethernet 802.3
DeviceID         : 4
Name             : VIA Rhine II Compatible Fast Ethernet Adapter
NetworkAddresses :
Speed            : 100000000

The information is strictly hardware related. You will not see anything related to the Internet, like an IP address assigned to the adapter. Those settings are available ...

Get Pro Windows PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.