New-AzPacketCaptureFilterConfig
建立新的封包擷取篩選物件。
Syntax
New-AzPacketCaptureFilterConfig
[-Protocol <String>]
[-RemoteIPAddress <String>]
[-LocalIPAddress <String>]
[-LocalPort <String>]
[-RemotePort <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
New-AzPacketCaptureFilterConfig Cmdlet 會建立新的封包擷取篩選物件。 此物件可用來限制使用指定準則在封包擷取會話期間擷取的封包類型。 New-AzNetworkWatcherPacketCapture Cmdlet 可以接受多個篩選物件,以啟用可組合的擷取會話。
範例
範例 1:建立具有多個篩選的封包擷取
$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "WestCentralUS" }
$networkWatcher = Get-AzNetworkWatcher -Name $nw.Name -ResourceGroupName $nw.ResourceGroupName
$storageAccount = Get-AzStorageAccount -ResourceGroupName contosoResourceGroup -Name contosostorage123
$filter1 = New-AzPacketCaptureFilterConfig -Protocol TCP -RemoteIPAddress "1.1.1.1-255.255.255" -LocalIPAddress "10.0.0.3" -LocalPort "1-65535" -RemotePort "20;80;443"
$filter2 = New-AzPacketCaptureFilterConfig -Protocol UDP
New-AzNetworkWatcherPacketCapture -NetworkWatcher $networkWatcher -TargetVirtualMachineId $vm.Id -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSeconds 60 -Filter $filter1, $filter2
在此範例中,我們會使用多個篩選和時間限制來建立名為 “PacketCaptureTest” 的封包擷取。 工作階段完成後,它會儲存至指定的記憶體帳戶。 注意:Azure 網路監看員 擴充功能必須安裝在目標虛擬機上,才能建立封包擷取。
參數
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶。
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalIPAddress
指定要篩選的本機 IP 位址。 單一位址專案的範例輸入:“127.0.0.1”。 “127.0.0.1-127.0.0.255” 範圍。 "127.0.0.1;127.0.0.5;“ 表示多個專案。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-LocalPort
指定要篩選的本機 IP 位址。 單一位址專案的範例輸入:“127.0.0.1”。 “127.0.0.1-127.0.0.255” 範圍。 "127.0.0.1;127.0.0.5;“ 表示多個專案。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Protocol
指定要篩選的通訊協定。 可接受的值 “TCP”,“UDP”,“Any”
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RemoteIPAddress
指定要篩選的遠端IP位址。 單一位址專案的範例輸入:“127.0.0.1”。 “127.0.0.1-127.0.0.255” 範圍。 "127.0.0.1;127.0.0.5;“ 表示多個專案。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RemotePort
指定要篩選的遠端埠。 遠端埠 範例輸入:單一埠專案的 「80」。。 範圍為 “80-85”。 "80;443;“ 表示多個專案。
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
輸入
輸出
備註
關鍵詞:azure, azurerm, arm, 資源, 管理, 管理員, 網路, 網路, 監看員, 封包, 擷取, 流量, 篩選
相關連結
- New-AzNetworkWatcher
- Get-AzNetworkWatcher
- Remove-AzNetworkWatcher
- Get-AzNetworkWatcherNextHop
- Get-AzNetworkWatcherSecurityGroupView
- Get-AzNetworkWatcherTopology
- Start-AzNetworkWatcherResourceTroubleshooting
- New-AzNetworkWatcherPacketCapture
- New-AzPacketCaptureScopeConfig
- Get-AzNetworkWatcherPacketCapture
- Remove-AzNetworkWatcherPacketCapture
- Stop-AzNetworkWatcherPacketCapture
- New-AzNetworkWatcherProtocolConfiguration
- Test-AzNetworkWatcherIPFlow
- Test-AzNetworkWatcher 連線 ivity
- Stop-AzNetworkWatcher 連線 ionMonitor
- Start-AzNetworkWatcher 連線 ionMonitor
- Set-AzNetworkWatcher 連線 ionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcher 連線 ionMonitor
- New-AzNetworkWatcher 連線 ionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcher 連線 ionMonitorReport
- Get-AzNetworkWatcher 連線 ionMonitor
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應