你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Start-AzVpnConnectionPacketCapture
Starts Packet Capture Operation on a Vpn Connection.
Syntax
Start-AzVpnConnectionPacketCapture
-ResourceGroupName <String>
-ParentResourceName <String>
-Name <String>
[-FilterData <String>]
-LinkConnectionName <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzVpnConnectionPacketCapture
-InputObject <PSVpnConnection>
[-FilterData <String>]
-LinkConnectionName <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Start-AzVpnConnectionPacketCapture
-ResourceId <String>
[-FilterData <String>]
-LinkConnectionName <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Starts Packet Capture Operation on a Vpn Connection.
Examples
Example 1
Start-AzVpnConnectionPacketCapture -ResourceGroupName "PktCaptureTestSite2RG" -Name "PktCaptureTestSite2Site1Cn" -ParentResourceName "VpnGw1" -LinkConnectionName "PktCaptureTestSite2Site1CnLink1"
Code : Succeeded
EndTime : 10/1/2019 12:52:37 AM
StartTime : 10/1/2019 12:52:25 AM
ResultsText :
LinkConnectionName: PktCaptureTestSite2Site1CnLink1
ResourceGroupName : PktCaptureTestSite2RG
Location : centraluseuap
ResourceGuid : ac70028f-5b88-4ad4-93d3-0b9a9172c382
Type :
Tag :
TagsTable :
Name : PktCaptureTestSite2Site1Cn
Etag :
Id :
Example 2
$a="{`"TracingFlags`":11,`"MaxPacketBufferSize`":120,`"MaxFileSize`":500,`"Filters`":[{`"SourceSubnets`":[`"10.19.0.4/32`",`"10.20.0.4/32`"],`"DestinationSubnets`":[`"10.20.0.4/32`",`"10.19.0.4/32`"],`"IpSubnetValueAsAny`":true,`"TcpFlags`":-1,`"PortValueAsAny`":true,`"CaptureSingleDirectionTrafficOnly`":true}]}"
Start-AzVpnConnectionPacketCapture -ResourceGroupName "PktCaptureTestSite2RG" -Name "PktCaptureTestSite2Site1Cn" -ParentResourceName "VpnGw1" -LinkConnectionName "PktCaptureTestSite2Site1CnLink1,PktCaptureTestSite2Site1CnLink1" -FilterData $a
Code : Succeeded
EndTime : 10/1/2019 12:52:37 AM
StartTime : 10/1/2019 12:52:25 AM
ResultsText :
LinkConnectionName: PktCaptureTestSite2Site1CnLink1,PktCaptureTestSite2Site1CnLink1
ResourceGroupName : PktCaptureTestSite2RG
Location : centraluseuap
ResourceGuid : ac70028f-5b88-4ad4-93d3-0b9a9172c382
Type :
Tag :
TagsTable :
Name : PktCaptureTestSite2Site1Cn
Etag :
Id :
Parameters
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilterData
Filter options for start packet capture on Vpn connection.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
The Vpn connection object where packet capture to be started.
Type: | PSVpnConnection |
Aliases: | VpnConnection |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-LinkConnectionName
The names of the SiteLinkConnection.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The Vpn connection name where packet capture to be started.
Type: | String |
Aliases: | ResourceName, VpnConnectionName, ConnectionName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentResourceName
The name of the Parent Vpngateway.
Type: | String |
Aliases: | ParentVpnGatewayName, VpnGatewayName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The resource group name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
The Azure resource ID of the VpnConnection where packet capture to be started.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Microsoft.Azure.Commands.Network.Models.PSVpnConnectionPacketCaptureResult