New-AzFirewallPacketCaptureParameter
Create a Packet Capture Parameter for Azure Firewall
Syntax
Default (Default)
New-AzFirewallPacketCaptureParameter
[-DurationInSeconds <UInt32>]
[-NumberOfPacketsToCapture <UInt32>]
[-SasUrl <String>]
[-FileName <String>]
[-Protocol <String>]
[-Flag <String[]>]
[-Filter <PSAzureFirewallPacketCaptureRule[]>]
-Operation <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Create a Packet Capture Parameter for Azure Firewall. The operation parameter is mandatory. All other parameters are only mandatory for Start operations and can be omitted for Status and Stop packet capture operations
Examples
Example 1: Configuring Azure Firewall Packet Capture with Advanced Rules and Parameters for start operation
$filter1 = New-AzFirewallPacketCaptureRule -Source "10.0.0.2","192.123.12.1" -Destination "172.32.1.2" -DestinationPort "80","443"
$filter2 = New-AzFirewallPacketCaptureRule -Source "10.0.0.5" -Destination "172.20.10.2" -DestinationPort "80","443"
# Create the firewall packet capture parameters
$Params = New-AzFirewallPacketCaptureParameter -DurationInSeconds 300 -NumberOfPacketsToCapture 5000 -SASUrl "ValidSasUrl" -Filename "AzFwPacketCapture" -Flag "Syn","Ack" -Protocol "Any" -Filter $Filter1, $Filter2 -Operation "Start"
This creates the parameters used for starting a packet capture on the azure firewall
Example 2: Configuring Azure Firewall Packet Capture for status operation
# Create the firewall packet capture parameters to check Status operation
$Params = New-AzFirewallPacketCaptureParameter -Operation "Status"
This creates the parameters used for getting the status of a packet capture operation on the azure firewall
Example 3: Configuring Azure Firewall Packet Capture for stop operation
# Create the firewall packet capture parameters to check Status operation
$Params = New-AzFirewallPacketCaptureParameter -Operation "Stop"
This creates the parameters used for stopping a packet capture operation on the azure firewall
Parameters
-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
-DurationInSeconds
The intended durations of packet capture in seconds
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-FileName
Name of packet capture file
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
-Filter
The list of filters to capture
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Flag
The list of tcp-flags to capture
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
-NumberOfPacketsToCapture
The intended number of packets to capture
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Operation
The packet capture operation to run
Parameter properties
Type: String
Default value: None
Accepted values: Start, Status, Stop
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
-Protocol
The Protocols to capture
Parameter properties
Type: String
Default value: None
Accepted values: Any, TCP, UDP, ICMP
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
-SasUrl
Upload capture storage container SASURL with write and delete permissions
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
-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 .
None
Outputs