Upravit

Sdílet prostřednictvím


New-AzFirewallPacketCaptureParameter

Create a Packet Capture Parameter for Azure Firewall

Syntax

New-AzFirewallPacketCaptureParameter
   -DurationInSeconds <UInt32>
   -NumberOfPacketsToCapture <UInt32>
   -SasUrl <String>
   -FileName <String>
   [-Protocol <String>]
   [-Flag <String[]>]
   -Filter <PSAzureFirewallPacketCaptureRule[]>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Create a Packet Capture Parameter for Azure Firewall

Examples

Example 1: Configuring Azure Firewall Packet Capture with Advanced Rules and Parameters

$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
New-AzFirewallPacketCaptureParameter  -DurationInSeconds 300 -NumberOfPacketsToCapture 5000 -SASUrl "ValidSasUrl" -Filename "AzFwPacketCapture" -Flag "Syn","Ack" -Protocol "Any" -Filter $Filter1, $Filter2

This creates the parameter for packet capture request with a set of rules.

Parameters

-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

-DurationInSeconds

The intended durations of packet capture in seconds

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

-FileName

Name of packet capture file

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

-Filter

The list of filters to capture

Type:PSAzureFirewallPacketCaptureRule[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Flag

The list of tcp-flags to capture

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

-NumberOfPacketsToCapture

The intended number of packets to capture

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

-Protocol

The Protocols to capture

Type:String
Accepted values:Any, TCP, UDP, ICMP
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SasUrl

Upload capture storage container SASURL with write and delete permissions

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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

None

Outputs

PSAzureFirewallPacketCaptureParameters