Invoke-AzFirewallPacketCapture
在 Azure 防火牆上叫用封包擷取
語法
Invoke-AzFirewallPacketCapture
-AzureFirewall <PSAzureFirewall>
-Parameter <PSAzureFirewallPacketCaptureParameters>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
在 Azure 防火牆上叫用封包擷取要求
範例
範例 1:在 Azure 防火牆上叫用封包擷取要求
$azureFirewall = New-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname -Location $location
$azFirewall = Get-AzFirewall -Name $azureFirewallName -ResourceGroupName $rgname
# Create a filter rules
$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
# Invoke a firewall packet capture
Invoke-AzFirewallPacketCapture -AzureFirewall $azureFirewall -Parameter $Params
此範例會使用所述的參數,在 Azure 防火牆上叫用封包擷取要求。
參數
-AsJob
在背景執行 Cmdlet
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-AzureFirewall
The AzureFirewall
類型: | PSAzureFirewall |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Parameter
封包擷取參數
類型: | PSAzureFirewallPacketCaptureParameters |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
輸入
PSAzureFirewallPacketCaptureParameters