Get-NetAdapter
Gets the basic network adapter properties.
Parameter Set: ByName
Get-NetAdapter [[-Name] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-IncludeHidden] [-Physical] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByIfIndex
Get-NetAdapter -InterfaceIndex <UInt32[]> [-AsJob] [-CimSession <CimSession[]> ] [-IncludeHidden] [-Physical] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Parameter Set: ByInstanceID
Get-NetAdapter -InterfaceDescription <String[]> [-AsJob] [-CimSession <CimSession[]> ] [-IncludeHidden] [-Physical] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
The Get-NetAdapter cmdlet gets the basic network adapter properties. By default only visible adapters are returned. To see the common network adapter properties, pipe the output into the Format-List cmdlet. To see all the properties, pipe the output to the Format-List with the Property parameter specified as any (*
). This cmdlet supports multiple views. The default view is as a table. To see more information regarding various network adapter identifiers use the names view using the Format-Table cmdlet with the View parameter specified as name. To see more information regarding the miniport (device driver) such as driver date or version use the driver view using the Format-Table cmdlet with the View parameter specified as driver.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Executa o cmdlet em uma sessão remota ou em um computador remoto. Insira um nome do computador ou um objeto de sessão, como a saída de um cmdlet New-CimSession ou Get-CimSession. O padrão é a sessão atual do computador local.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies both visible and hidden network adapters should be included. 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.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Specifies the network adapter interface description. 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
.
Aliases |
ifDesc |
Necessário? |
true |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
true (ByPropertyName) |
Aceitar caracteres curinga? |
true |
Specifies the network adapter interface index number.
Aliases |
nenhuma |
Necessário? |
true |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
true (ByPropertyName) |
Aceitar caracteres curinga? |
false |
Specifies the name of the network adapter.
Aliases |
ifAlias, InterfaceAlias |
Necessário? |
false |
Posição? |
1 |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
true |
Returns all physical network adapters.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Especifica o número máximo de operações simultâneas que podem ser estabelecidas para executar o cmdlet. Se esse parâmetro for omitido ou um valor de 0
for inserido, o Windows PowerShell® calculará o limite ideal de restrição para o cmdlet com base no número de cmdlets do CIM que estão em execução no computador. O limite de restrição se aplica somente ao cmdlet atual, e não à sessão ou ao computador.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.
- None
O tipo de saída é o tipo de objeto emitido pelo cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/StandardCimv2/NetAdapter
O objeto
Microsoft.Management.Infrastructure.CimInstance
é uma classe wrapper que exibe objetos da WMI (Instrumentação de Gerenciamento do Windows). O caminho após o sinal de cerquilha (#
) indica o namespace e o nome de classe do objeto subjacente da WMI.
This example gets all of the visible network adapters.
PS C:\> Get-NetAdapter -Name *
This example gets all of the network adapters.
PS C:\> Get-NetAdapter -Name * -IncludeHidden
This example gets all of the physical network adapters.
PS C:\> Get-NetAdapter -Name * -Physical
This example gets the network adapter named Ethernet 2.
PS C:\> Get-NetAdapter -Name "Ethernet 2"
A version of the cmdlet that uses wildcard characters.
PS C:\> Get-NetAdapter -Name "E*2"
A version of the cmdlet that uses position and wildcard characters.
PS C:\> Get-NetAdapter "E*2"
This example displays the common properties for the network adapter named Ethernet 2.
PS C:\> Get-NetAdapter –Name "Ethernet 2" | Format-List –Property *
This example displays all of the properties for the network adapter named Ethernet 2,
PS C:\> Get-NetAdapter –Name "Ethernet 2" | Format-List -Property *
This example gets all of network adapters using the interface description that matches the prefix pattern VendorAdapter.
PS C:\> Get-NetAdapter -Name * -InterfaceDescription "VendorAdapter*"
This example displays the Name, InterfaceDescription, and InterfaceName parameter values for all network adapters.
PS C:\> Get-NetAdapter -Name * -IncludeHidden | Format-List -Property Name, InterfaceDescription, InterfaceName
This example gets the visible network adapters on the server named Server5. Note: The server named Server5 can be a remote computer.
PS C:\> Get-NetAdapter -Name * –CimSession Server5
This example gets the visible network adapters and formats the output to present driver information.
PS C:\> Get-NetAdapter -Name * | Format-Table –View Driver
This example gets the visible network adapters and formats the output to present various names by which a network adapter can be identified such as the Name, InterfaceDescription, and InterfaceIndex parameter values.
PS C:\> Get-NetAdapter -Name * | Format-Table –View Name