PowerShell Genie

Inventory network adapters

Script 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn

Inventory network interfaces with Get-NetAdapter. Report status, link speed, MAC address, and driver description beside each interface name.

The script

1PS> Get-NetAdapter | Select-Object Name,Status,LinkSpeed,MacAddress,InterfaceDescription

Script reader

Inspect before you run

Inspection only

Inspect the script below. It does not run in this browser.

Inspection only — no command has run.

    Show reference output
    1 Name Status LinkSpeed MacAddress InterfaceDescription
    2 ---- ------ --------- ---------- --------------------
    3 Ethernet Up 1 Gbps 00-11-22-33-44-55 Intel(R) Ethernet Adapter
    Inspect this example’s structure

    Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.

    Get-NetAdapter | Select-Object Name,Status,LinkSpeed,MacAddress,InterfaceDescription
    1. Stage 1Get-NetAdapterPositional values or no named parameters
    2. Stage 2Select-ObjectPositional values or no named parameters

      How it works

      Get-NetAdapter enumerates the visible network interfaces and Select-Object reports the friendly name next to Status, LinkSpeed, MacAddress, and the InterfaceDescription that identifies the underlying driver.

      Adapting it

      Adding -IncludeHidden surfaces the tunnel and loopback pseudo-adapters that the default view suppresses, which becomes relevant when chasing a routing oddity that no visible interface explains.

      If the result is unexpected

      A NIC the network team can see on the switch does not appear, or sorting by LinkSpeed places a 10 Gbps adapter below a 1 Gbps one.

      The default view hides adapters flagged as hidden, which covers tunnels, loopback, and some teaming members. LinkSpeed is a display string rather than a number, so any comparison against it is lexical. An adapter with no driver bound reports as Not Present and is easy to skip over in a long list.

      1. Rerun with -IncludeHidden and compare the row count against the first result.
      2. Check Get-NetLbfoTeam or Get-NetAdapterBinding if the missing adapter belongs to a team.
      3. Sort on the numeric Speed property rather than on the formatted LinkSpeed string.
      4. Look at Get-PnpDevice for network class devices when an adapter is physically present and missing here.
      5. Confirm the adapter is enabled, since a disabled interface still appears but with a status that is easy to overlook.

      Validate the result

      The adapter in question appears with a Status of Up, and sorting on Speed puts the fastest interface at the top.

      Keep the check reliable

      Sort and compare on the numeric Speed property in any report, and include hidden adapters whenever the goal is a complete inventory.

      Primary documentation

      Windows services and processes documentation

      Continue
      Genie guideInventory network adapters

      Inventory network interfaces with Get-NetAdapter. Report status, link speed, MAC address, and driver description beside each interface name.