Compartir a través de


Add-NetEventNetworkAdapter

Add-NetEventNetworkAdapter

Adds a network adapter as a filter on a provider.

Sintaxis

Parameter Set: cim:CreateInstance0
Add-NetEventNetworkAdapter [-Name] <String> [[-PromiscuousMode] <System.Boolean> ] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Descripción detallada

The Add-NetEventNetworkAdapter cmdlet adds a network adapter as a filter on a Remote Packet Capture provider. The protocol stack uses multiple layers to transmit, receive, and process network traffic, or packets. The provider logs network traffic as Event Tracing for Windows (ETW) events.

Use this cmdlet multiple times to add several adapters. To see which adapters currently belong to a provider, use the Get-NetEventNetworkAdapter cmdlet.

When you add an adapter to provider in a session that is currently running, stop and start the session for your changes to take effect. Use the Stop-NetEventSession cmdlet to stop a session and the Start-NetEventSession cmdlet to restart it.

Parámetros

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

none

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Name<String>

Specifies the name of a network adapter to add.

Alias

none

¿Requerido?

true

¿Posición?

1

Valor predeterminado

none

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PromiscuousMode<System.Boolean>

Specifies whether the network adapter uses promiscuous mode. Promiscuous mode starts when the packet capture session starts. When the packet capture session stops, the network adapter is restored to its original setting for promiscuous mode.

This cmdlet supports this parameter for the Windows 8.1 operating system and the Windows Server 2012 R2 operating system only. You must install the hotfix in the topic Promiscuous mode is not set on network adapter to monitor network traffic in Windows Server 2012 R2 (https://support.microsoft.com/en-us/kb/3047154) in the Microsoft Support library.

Alias

none

¿Requerido?

false

¿Posición?

2

Valor predeterminado

none

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

none

¿Requerido?

false

¿Posición?

named

Valor predeterminado

none

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

<WorkflowParameters>

Este cmdlet admite los siguientes parámetros comunes de flujos de trabajo: -PSParameterCollection, -PSComputerName, -PSCredential, -PSConnectionRetryCount, -PSConnectionRetryIntervalSec, -PSRunningTimeoutSec, -PSElapsedTimeoutSec, -PSPersist, -PSAuthentication, -PSAuthenticationLevel, -PSApplicationName, -PSPort, -PSUseSSL, -PSConfigurationName, -PSConnectionURI, -PSAllowRedirection, -PSSessionOption, -PSCertificateThumbprint, -PSPrivateMetadata, -AsJob, -JobName e –InputObject. Para obtener más información, consulte  about_WorkflowCommonParameters.

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

Example 1: Add a network adapter

This example creates a network event session, adds a provider, and then adds a network adapter.

The first command uses the New-NetEventSession cmdlet to create a network event session named Session38.

The second command adds a provider to the session named Session38 by using the Add-NetEventPacketCaptureProvider cmdlet. A session must have a provider in order to capture packets.

The third command adds a network adapter. After you create and configure the session, use the Start-NetEventSession cmdlet to start capturing packets.

PS C:\> New-NetEventSession -Name "Session38"
PS C:\> Add-NetEventPacketCaptureProvider -SessionName "Session38"
PS C:\> Add-NetEventNetworkAdapter -Name "Ethernet01"

Temas relacionados

Get-NetEventNetworkAdapter

Remove-NetEventNetworkAdapter

New-NetEventSession

Add-NetEventPacketCaptureProvider