你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
New-AzFirewallPacketCaptureParameter
为 Azure 防火墙创建数据包捕获参数
语法
New-AzFirewallPacketCaptureParameter
-DurationInSeconds <UInt32>
-NumberOfPacketsToCapture <UInt32>
-SasUrl <String>
-FileName <String>
[-Protocol <String>]
[-Flag <String[]>]
-Filter <PSAzureFirewallPacketCaptureRule[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
为 Azure 防火墙创建数据包捕获参数
示例
示例 1:使用高级规则和参数配置 Azure 防火墙数据包捕获
$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
这会使用一组规则为数据包捕获请求创建参数。
参数
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DurationInSeconds
数据包捕获的预期持续时间(以秒为单位)
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-FileName
数据包捕获文件的名称
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Filter
要捕获的筛选器列表
类型: | PSAzureFirewallPacketCaptureRule[] |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Flag
要捕获的 tcp 标志列表
类型: | String[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-NumberOfPacketsToCapture
要捕获的数据包的预期数量
类型: | UInt32 |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Protocol
要捕获的协议
类型: | String |
接受的值: | Any, TCP, UDP, ICMP |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-SasUrl
上传包含写入和删除权限的捕获存储容器 SASURL
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
None