Get-NetAdapter

Get the basic network adapter properties.

Syntax
      Get-NetAdapter {[-Name] String[] | -InterfaceDescription String[] | -InterfaceIndex UInt32[] }
         [-IncludeHidden] [-Physical] [-CimSession CimSession[]]
            [-ThrottleLimit Int32] [-AsJob] [CommonParameters]

Key
   -AsJob
       Run the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
       The cmdlet immediately returns an object that represents the job and then displays the command prompt.
       You can continue to work in the session while the job completes.
       To manage the job, use the *-Job cmdlets. To get the job results, use Receive-Job. 

   -CimSession
       Run the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such
       as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local
       computer.

   -IncludeHidden
       Include both visible and hidden network adapters in the operation.
       By default only visible network adapters are included. If a wildcard character is used in identifying a
       network adapter and this parameter has been specified, then the wildcard string is matched against both
       hidden and visible network adapters.

   -InterfaceDescription String[]
       An array of network adapter interface descriptions.
       For a physical network adapter this is typically the name of the vendor of the network adapter followed by
       a part number and description, such as Contoso 12345 Gigabit Network Device.

   -InterfaceIndex UInt32[]
       The network adapter interface index number as an array.

   -Name String[]
       An array of network adapter names.

   -Physical
       Get all physical network adapters.

   -ThrottleLimit
       The maximum number of concurrent operations that can be established to run the cmdlet.
       If this parameter is omitted or a value of 0 is entered, then PowerShell calculates an optimum throttle limit for
       the cmdlet based on the number of CIM cmdlets that are running on the computer.
       The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Standard Aliases for Get-NetIPCConfiguration: none

Examples

Get all visible network adapters:

PS C:\> Get-NetAdapter -Name *

Get all visible and hidden network adapters:

PS C:\> Get-NetAdapter -Name * -IncludeHidden | Select-Object name, status

Get all physical network adapters:

PS C:\> Get-NetAdapter -Name * -Physical

Get a network adapter by the specified name:

PS C:\> Get-NetAdapter -Name "Ethernet 2"

Get a network adapter by a partial name:

PS C:\> Get-NetAdapter -Name "E*2"

Display the common properties for the specified network adapter:

PS C:\> Get-NetAdapter -Name "Ethernet 3" | Format-List

Display all properties for the specified network adapter:

PS C:\> Get-NetAdapter -Name "Ethernet 3" | Format-List -Property *

Display just the MacAddress for the specified network adapter:

PS C:\> (Get-NetAdapter).MacAddress

Get all network adapters using the interface description that matches a prefix pattern:

PS C:\> Get-NetAdapter -Name * -InterfaceDescription "VendorAdapter*"

Display parameter values for all network adapters:

PS C:\> Get-NetAdapter -Name "*" -IncludeHidden | Format-List -Property "Name", "InterfaceDescription", "InterfaceName"

Get the visible network adapters on the specified server:

PS C:\> Get-NetAdapter -Name * -CimSession "Server64"

Get the visible network adapters and view the driver information:

PS C:\> Get-NetAdapter -Name * | Format-Table -View Driver

Get visible network adapters and view the DeviceID and NetLuid:

PS C:\> Get-NetAdapter -Name * | Format-Table -View Names

“For anybody, who changes his principles, depending on who he is dealing. That is not a man who can lead a nation” ~ Nelson Mandela

Related PowerShell Cmdlets

Get-NetTCPConnection - Get TCP connections.
Get-DNSClientServerAddress -
Get-NetIPAddress - Get IP address configuration.
Get-NetIPInterface - Get an IP interface.
Get-NetRoute - Create a route in the IP routing table.
Test-NetConnection - Display diagnostic information for a connection.


 
Copyright © 1999-2024 SS64.com
Some rights reserved