Stop-AzVirtualNetworkGatewayConnectionPacketCapture

Interrompe a operação de captura de pacotes em uma conexão de gateway de rede virtual

Syntax

Stop-AzVirtualNetworkGatewayConnectionPacketCapture
    -ResourceGroupName <String>
    -Name <String>
    -SasUrl <String>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Stop-AzVirtualNetworkGatewayConnectionPacketCapture
    -InputObject <PSVirtualNetworkGatewayConnection>
    -SasUrl <String>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]
Stop-AzVirtualNetworkGatewayConnectionPacketCapture
    -ResourceId <String>
    -SasUrl <String>
    [-AsJob]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Interrompe a Operação de Captura de Pacotes em uma conexão de Gateway de Rede Virtual e carregará o resultado em determinado SasUrl do contêiner de armazenamento.

Exemplos

Exemplo 1

$rgname = "testRg"
$storeName = "teststorage"
$containerName = "packetcaptureresults"
$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName
$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value
New-AzStorageContainer -Name $containerName -Context $context
$container = Get-AzStorageContainer -Name $containerName -Context $context
$now = Get-Date
$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
Stop-AzVirtualNetworkGatewayConnectionPacketCapture -ResourceGroupName $rgname -Name "testconn" -SasUrl $sasurl

Code              : Succeeded
EndTime           : 10/1/2019 12:54:51 AM
StartTime         : 10/1/2019 12:53:40 AM
ResultsText       :
ResourceGroupName : testRg
Location          : centraluseuap
ResourceGuid      : ac70028f-5b88-4ad4-93d3-0b9a9172c382
Type              :
Tag               :
TagsTable         :
Name              : testconn
Etag              :
Id                :

Exemplo 2

$rgname = "testRg"
$storeName = "teststorage"
$containerName = "packetcaptureresults"
$key = Get-AzStorageAccountKey -ResourceGroupName $rgname -Name $storeName
$context = New-AzStorageContext -StorageAccountName $storeName -StorageAccountKey $key[0].Value
$container = Get-AzStorageContainer -Name $containerName -Context $context
$now = Get-Date
$sasurl = New-AzStorageContainerSASToken -Name $containerName -Context $context -Permission "rwd" -StartTime $now.AddHours(-1) -ExpiryTime $now.AddDays(1) -FullUri
$conn = Get-AzVirtualNetworkGatewayConnection -name "testconn" -ResourceGroupName $rgname
Stop-AzVirtualNetworkGatewayConnectionPacketCapture -InputObject $conn -SasUrl $sasurl

Code              : Succeeded
EndTime           : 10/1/2019 12:54:51 AM
StartTime         : 10/1/2019 12:53:40 AM
ResultsText       :
ResourceGroupName : testRg
Location          : centraluseuap
ResourceGuid      : ac70028f-5b88-4ad4-93d3-0b9a9172c382
Type              :
Tag               :
TagsTable         :
Name              : testconn
Etag              :
Id                :

Parâmetros

-AsJob

Executar cmdlet em segundo plano

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Solicita sua confirmação antes de executar o cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

As credenciais, a conta, o locatário e a assinatura usados para a comunicação com o Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

O objeto de conexão do gateway de rede virtual onde a captura de pacotes deve ser iniciada.

Type:PSVirtualNetworkGatewayConnection
Aliases:VirtualNetworkGatewayConnection
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

O nome da conexão do gateway de rede virtual onde a captura de pacotes deve ser iniciada.

Type:String
Aliases:ResourceName, ConnectionName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

O nome do grupo de recursos.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

A ID de recurso do Azure do VirtualNetworkGatewayConnection onde a captura de pacotes deve ser iniciada.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-SasUrl

URL SAS para interromper a captura de pacotes no gateway de rede virtual.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Entradas

PSVirtualNetworkGatewayConnection

String

Saídas

PSVirtualNetworkGatewayPacketCaptureResult