PowerShell Genie

Get-NetAdapter

Use Get-NetAdapter to list the network adapters on a Windows machine with their status, speed and MAC address.

Command 2 min read PowerShell 7 on Windows

Documentation: Microsoft Learn — PowerShell module reference

Syntax

1PS> Get-NetAdapter [[-Name] <string[]>] [-InterfaceDescription <String[]>] [-IncludeHidden] [-Physical] [-CimSession <CimSession[]>] [<CommonParameters>]
See the command anatomy

Inspect this authored example with fictional data in the bounded browser model. The numbered stages show how its objects change.

Get-NetAdapter [[-Name] <string[]>] [-InterfaceDescription <String[]>] [-IncludeHidden] [-Physical] [-CimSession <CimSession[]>] [<CommonParameters>]
  1. Stage 1Get-NetAdapter-Name -InterfaceDescription -IncludeHidden -Physical -CimSession

    Try it

    Windows PowerShell

    Browser simulation · fictional data; no changes to your computer.

    Interactive simulation · fictional data

    Examples

    Select Name, Status, LinkSpeed, InterfaceIndex

    1PS> Get-NetAdapter | Select-Object Name, Status, LinkSpeed, InterfaceIndex
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Name      Status        LinkSpeed  InterfaceIndex
    --------  ------------  ---------  --------------
    Ethernet  Up            1 Gbps     12
    Wi-Fi     Disconnected  0 bps      17

    Filter by Status

    1PS> Get-NetAdapter -Physical | Where-Object Status -eq Up
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Name      Status        LinkSpeed  InterfaceIndex
    --------  ------------  ---------  --------------
    Ethernet  Up            1 Gbps     12
    Wi-Fi     Disconnected  0 bps      17

    Select Name, Status

    1PS> Get-NetAdapter -IncludeHidden | Select-Object Name, Status
    Show reference output

    Sample output · fictional data, shaped like the real thing

    Name      Status
    --------  ------------
    Ethernet  Up
    Wi-Fi     Disconnected

    Parameters

    Parameter definitions:

    • -Name
    • -InterfaceDescription
    • -IncludeHidden
    • -Physical
    • -CimSession

    PowerShell module reference on Microsoft Learn

    Practical use and troubleshooting

    Practical scenario: Use Get-NetAdapter when you need to list the network adapters on a Windows machine with their status, speed and MAC address. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.

    Common error and fix: An empty adapter filter can result from confusing interface description with alias. Inspect Name and InterfaceDescription and use the intended identifier. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.

    See also: Get-NetIPConfiguration. Get-NetAdapter describes interfaces and link state; Get-NetIPConfiguration describes IP, gateway and DNS configuration. An Up interface does not prove that its IP settings are correct. Read the linked command before substituting it; similar names do not imply identical inputs or output.

    Get-NetAdapter reference on Microsoft Learn

    Recap

    Get-NetAdapter Use Get-NetAdapter to list the network adapters on a Windows machine with their status, speed and MAC address.

    Next: Get-LocalUser
    Genie guideGet-NetAdapter

    Use Get-NetAdapter to list the network adapters on a Windows machine with their status, speed and MAC address. The console below is pre-loaded — run it, then change a value and run it again.