Start-AzVpnConnectionPacketCapture
Starts Packet Capture Operation on a Vpn Connection.
Syntax
ByVpnConnectionName (Default)
Start-AzVpnConnectionPacketCapture
-ResourceGroupName <String>
-ParentResourceName <String>
-Name <String>
-LinkConnectionName <String>
[-FilterData <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVpnConnectionObject
Start-AzVpnConnectionPacketCapture
-InputObject <PSVpnConnection>
-LinkConnectionName <String>
[-FilterData <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByVpnConnectionResourceId
Start-AzVpnConnectionPacketCapture
-ResourceId <String>
-LinkConnectionName <String>
[-FilterData <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
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FilterData
Filter options for start packet capture on Vpn connection.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
The Vpn connection object where packet capture to be started.
Type: PSVpnConnection
Default value: None
Supports wildcards: False
DontShow: False
Aliases: VpnConnection
ByVpnConnectionObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-LinkConnectionName
The names of the SiteLinkConnection.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The Vpn connection name where packet capture to be started.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName, VpnConnectionName, ConnectionName
Parameter sets
ByVpnConnectionName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ParentResourceName
The name of the Parent Vpngateway.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ParentVpnGatewayName, VpnGatewayName
Parameter sets
ByVpnConnectionName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnConnectionName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The Azure resource ID of the VpnConnection where packet capture to be started.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByVpnConnectionResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs
Microsoft.Azure.Commands.Network.Models.PSVpnConnectionPacketCaptureResult