Share via


Remove-NetEventVmSwitch

Remove-NetEventVmSwitch

Removes Hyper-V virtual switches from a provider.

Sintaxe

Parameter Set: ByName
Remove-NetEventVmSwitch [-Name] <String[]> [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Parameter Set: InputObject (cdxml)
Remove-NetEventVmSwitch [-CimSession <CimSession[]> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>] [ <WorkflowParameters>]

Descrição detalhada

The Remove-NetEventVmSwitch cmdlet removes Hyper-V virtual switches and the settings for the virtual switches from a Remote Packet Capture provider. You can specify the names of the Hyper-V virtual switches, or use the InputObject parameter to specify a NetEventVmSwitch object to remove. To obtain a NetEventVmSwitch object, use the Get-NetEventVmSwitch cmdlet. When you remove a Hyper-V virtual switch, the Remote Packet Capture provider no longer uses the Hyper-V virtual switch to capture event packets.

The protocol stack uses multiple layers to transmit, receive, and process network traffic as packets. The provider logs network traffic as Event Tracing for Windows (ETW) events.

Parâmetros

-CimSession<CimSession[]>

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

Session

Necessário?

false

Posição?

named

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Name<String[]>

Specifies an array of names of Hyper-V virtual switches to remove.

Aliases

none

Necessário?

true

Posição?

1

Valor padrão

none

Aceitar entrada do pipeline?

True (ByPropertyName)

Aceitar caracteres curinga?

false

-PassThru

Retorna um objeto que representa o item com o qual você está trabalhando. Por padrão, este cmdlet não gera saída.

Aliases

none

Necessário?

false

Posição?

named

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-ThrottleLimit<Int32>

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

none

Necessário?

false

Posição?

named

Valor padrão

none

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-Confirm

Solicita que você confirme antes de executar o cmdlet.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

-WhatIf

Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.

Necessário?

false

Posição?

named

Valor padrão

false

Aceitar entrada do pipeline?

false

Aceitar caracteres curinga?

false

<CommonParameters>

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).

<WorkflowParameters>

Este cmdlet dá suporte aos seguintes parâmetros comuns de fluxo de trabalho: -PSParameterCollection, -PSComputerName, -PSCredential, -PSConnectionRetryCount, -PSConnectionRetryIntervalSec, -PSRunningTimeoutSec, -PSElapsedTimeoutSec, -PSPersist, -PSAuthentication, -PSAuthenticationLevel, -PSApplicationName, -PSPort, -PSUseSSL, -PSConfigurationName, -PSConnectionURI, -PSAllowRedirection, -PSSessionOption, -PSCertificateThumbprint, -PSPrivateMetadata, -AsJob, -JobName e –InputObject. Para obter mais informações, consulte  about_WorkflowCommonParameters.

Entradas

O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.

Saídas

O tipo de saída é o tipo de objeto emitido pelo cmdlet.

Exemplos

Example 1: Remove a Hyper-V virtual switch from a provider

This example removes a Hyper-V virtual switch from the Remote Packet Capture for a network session.

The first command uses New-NetEventSession the creates the network session named NESession01.

The second command uses the Add-NetEventPacketCaptureProvider cmdlet to add a Remote Packet Capture provider for the session named NESession01.

The third command uses the Add-NetEventVmSwitch cmdlet to add the Hyper-V virtual switch named Network Adapter 2 - Virtual Switch as a filter on the Remote Packet Capture provider.

The fourth command removes the Hyper-V virtual switch named Network Adapter 2 - Virtual Switch from the provider.

PS C:\> New-NetEventSession -Name "NESession01" 
PS C:\> Add-NetEventPacketCaptureProvider -SessionName "NESession01"
PS C:\> Add-NetEventVMSwitch -Name "Network Adapter 2 - Virtual Switch"
PS C:\> Remove-NetEventVMSwitch -Name "Network Adapter 2 - Virtual Switch"

Tópicos relacionados

Get-NetEventVmSwitch

Add-NetEventVmSwitch