New-AzNetworkWatcherPacketCapture
Yeni bir paket yakalama kaynağı oluşturur ve vm'de paket yakalama oturumu başlatır.
Syntax
New-AzNetworkWatcherPacketCapture
-NetworkWatcher <PSNetworkWatcher>
-PacketCaptureName <String>
-TargetVirtualMachineId <String>
[-StorageAccountId <String>]
[-StoragePath <String>]
[-LocalFilePath <String>]
[-BytesToCapturePerPacket <Int32>]
[-TotalBytesPerSession <UInt32>]
[-TimeLimitInSeconds <Int32>]
[-Filter <PSPacketCaptureFilter[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherPacketCapture
-NetworkWatcherName <String>
-ResourceGroupName <String>
-PacketCaptureName <String>
-TargetVirtualMachineId <String>
[-StorageAccountId <String>]
[-StoragePath <String>]
[-LocalFilePath <String>]
[-BytesToCapturePerPacket <Int32>]
[-TotalBytesPerSession <UInt32>]
[-TimeLimitInSeconds <Int32>]
[-Filter <PSPacketCaptureFilter[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzNetworkWatcherPacketCapture
-Location <String>
-PacketCaptureName <String>
-TargetVirtualMachineId <String>
[-StorageAccountId <String>]
[-StoragePath <String>]
[-LocalFilePath <String>]
[-BytesToCapturePerPacket <Int32>]
[-TotalBytesPerSession <UInt32>]
[-TimeLimitInSeconds <Int32>]
[-Filter <PSPacketCaptureFilter[]>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-AzNetworkWatcherPacketCapture cmdlet'i yeni bir paket yakalama kaynağı oluşturur ve bir VM'de paket yakalama oturumu başlatır. Paket Yakalama oturumlarının uzunluğu bir zaman kısıtlaması veya boyut kısıtlaması aracılığıyla yapılandırılabilir. Her paket için yakalanan veri miktarı da yapılandırılabilir. Filtreler belirli bir paket yakalama oturumuna uygulanabilir ve yakalanan paketlerin türünü özelleştirmenizi sağlar. Filtreler, yerel ve uzak IP adresleri ve adres aralıkları, yerel ve uzak bağlantı noktaları ve bağlantı noktası aralıkları ile yakalanacak oturum düzeyi protokolündeki paketleri kısıtlayabilir. Filtreler birleştirilebilir ve size yakalama ayrıntı düzeyi sağlamak için birden çok filtre uygulanabilir.
Örnekler
Örnek 1: Birden çok filtreyle Paket Yakalama oluşturma
$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
Bu örnekte, birden çok filtre ve bir zaman sınırı ile "PacketCaptureTest" adlı bir paket yakalaması oluşturuyoruz. Oturum tamamlandıktan sonra belirtilen depolama hesabına kaydedilir. Not: Paket yakalamaları oluşturmak için Hedef sanal makineye Azure Ağ İzleyicisi uzantısı yüklenmelidir.
Parametreler
-AsJob
Cmdlet'i arka planda çalıştırma
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BytesToCapturePerPacket
Paket başına yakalanacak bayt sayısı.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Cmdlet'i çalıştırmadan önce sizden onay ister.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Filter
Paket yakalama oturumu için filtreler.
Type: | PSPacketCaptureFilter[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalFilePath
Yerel dosya yolu.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Ağ izleyicisinin konumu.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-NetworkWatcher
Ağ izleyicisi kaynağı.
Type: | PSNetworkWatcher |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NetworkWatcherName
Ağ izleyicisinin adı.
Type: | String |
Aliases: | Name |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PacketCaptureName
Paket yakalama adı.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Ağ izleyicisi kaynak grubunun adı.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StorageAccountId
hesap kimliğini Depolama.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StoragePath
Depolama yolu.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetVirtualMachineId
Hedef sanal makine kimliği.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TimeLimitInSeconds
Saniye olarak süre sınırı.
Type: | Nullable<T>[Int32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TotalBytesPerSession
Oturum başına toplam bayt sayısı.
Type: | Nullable<T>[UInt32] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Cmdlet çalıştırılıyorsa ne olacağını gösterir. Cmdlet çalıştırılmaz.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Girişler
Nullable<T>[[System.Int32, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Çıkışlar
Notlar
Anahtar sözcükler: azure, azurerm, arm, kaynak, yönetim, yönetici, ağ, ağ, ağ izleyicisi, paket, yakalama, trafik
İlişkili Bağlantılar
- New-AzNetworkWatcher
- Get-AzNetworkWatcher
- Remove-AzNetworkWatcher
- Get-AzNetworkWatcherNextHop
- Get-AzNetworkWatcherSecurityGroupView
- Get-AzNetworkWatcherTopology
- Start-AzNetworkWatcherResourceTroubleshooting
- New-AzNetworkWatcherPacketCapture
- New-AzPacketCaptureFilterConfig
- Get-AzNetworkWatcherPacketCapture
- Remove-AzNetworkWatcherPacketCapture
- Stop-AzNetworkWatcherPacketCapture
- New-AzNetworkWatcherProtocolConfiguration
- Test-AzNetworkWatcherIPFlow
- Test-AzNetworkWatcher Bağlan ivity
- Stop-AzNetworkWatcher Bağlan ionMonitor
- Start-AzNetworkWatcher Bağlan ionMonitor
- Set-AzNetworkWatcher Bağlan ionMonitor
- Set-AzNetworkWatcherConfigFlowLog
- Remove-AzNetworkWatcher Bağlan ionMonitor
- New-AzNetworkWatcher Bağlan ionMonitor
- Get-AzNetworkWatcherTroubleshootingResult
- Get-AzNetworkWatcherReachabilityReport
- Get-AzNetworkWatcherReachabilityProvidersList
- Get-AzNetworkWatcherFlowLogStatus
- Get-AzNetworkWatcher Bağlan ionMonitorReport
- Get-AzNetworkWatcher Bağlan ionMonitor
Azure PowerShell
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin