PowerTip: Find Information about Network Adapters with PowerShell

Summary: Use Windows PowerShell in Windows 8 to find information about network adapters.

Hey, Scripting Guy! Question In Windows 8, how can I find information about network adapters?

Hey, Scripting Guy! Answer Use the Get-NetAdapter function:


Comments (5)

  1. jrv says:

    It is not necessary to generate objects when you already have objects.  The habit only adds unnecessary complexity to the task.  Use your object and manipulate its outcome. Faster – cleaner.

    gwmi win32_networkadapter |

        select Name,MacAddress,NetConnectionID,PhysicalAdapter,


    Also- it's a pipeline.  One-liners do not have to be written all on one line.  Format for clarity.

  2. Krunch {The Commenter formerly known as K} says:

    In PoSh v2:

    (gwmi win32_networkadapter) | %{ new-object pscustomobject -pro @{'name' = $_.name; 'MAC' = $_.macaddress; 'Last Reset'= $_.converttodatetime($_.TimeOfLastReset); 'Description' = $_.NetConnectionID; 'PHY-or-VIRTUAL' = $_.PhysicalAdapter}} | ft -auto

  3. Krunch {The Commenter formerly known as K} says:

    @jrv while i will take your comments, i will have to respectfully disagree:

    1. Complexity…there's no such thing, its just layers of simplicity

    2. whitespace is a waist

    3. Cleaner?… if you don't know what your reading i could make it the cleanest possible code in the world, you still wouldn't know whats going on. So to say make it more "Readable" or "Clean" is ridiculous. if you know PoSh then its readable, its clean, by the mere fact that there is alphabetic symbols on a screen and you have grouped them into words and phrases. I'm not writing a book or teaching a PEBKAC, if your reading this blog i would assume you know PoSh already (in some variation)

    4. i will agree that using select would have been better. Sorry i was using the same line i found in the post 'Weekend Scripter: Use PowerShell to Find Auto-Connect Wireless Networks'

  4. Krunch {The Commenter formerly known as K} says:

    i wrote waist when it was suppose to be waste.

    Sorry i believe i have ruined my argument already.. so no one pay attention to the *** who cant spell

  5. @K says:

    The standards and practices of good programming do apply.

    Mostly I was noting to ALL that the construct was overly complicated without necessity.


Skip to main content