New-AzPacketCaptureScopeConfig
Yeni bir paket yakalama kapsamı nesnesi oluşturur.
Syntax
New-AzPacketCaptureScopeConfig
[-Include <String[]>]
[-Exclude <String[]>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
New-AzPacketCaptureScopeConfig cmdlet'i yeni bir paket yakalama kapsamı nesnesi oluşturur. Bu nesne, Paket Yakalamalarını çalıştırmak için sağlanan VMSS Örneklerini dahil etmek veya dışlamak için kullanılır. New-AzPacketCaptureScopeConfig cmdlet'i birden çok VMSS Örneği Adını kabul edebilir, oluşturulabilir yakalama oturumlarını etkinleştirebilir/devre dışı bırakabilir.
Örnekler
Örnek 1: Kapsama Ekle'de birden çok VMSS Örneği ile Paket Yakalama oluşturma
$nw = Get-AzResource | Where {$_.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
$instance1 = $vmssInstance1.Name
$instance2 = $vmssInstance2.Name
$scope = New-AzPacketCaptureScopeConfig -Include $instance1, $instance2
New-AzNetworkWatcherPacketCaptureV2 -NetworkWatcher $networkWatcher -TargetId $vmss.Id -TargetType "azurevmss" -Scope $scope -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSecond 60
Bu örnekte, Kapsamı Ekle ve zaman sınırında birden çok VMSS Örneği 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.
Örnek 2: Dışlama Kapsamında birden çok VMSS Örneği ile Paket Yakalama oluşturma
$nw = Get-AzResource | Where {$_.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
$instance1 = $vmssInstance1.Name
$instance2 = $vmssInstance2.Name
$scope = New-AzPacketCaptureScopeConfig -Exclude $instance1, $instance2
New-AzNetworkWatcherPacketCaptureV2 -NetworkWatcher $networkWatcher -TargetId $vmss.Id -TargetType "azurevmss" -Scope $scope -PacketCaptureName "PacketCaptureTest" -StorageAccountId $storageAccount.id -TimeLimitInSecond 60
Bu örnekte, Dışlama Kapsamında birden çok VMSS Örneği ile "PacketCaptureTest" adlı bir paket yakalaması oluşturuyoruz. Bu, sağlanan Örnek dışında Paket Yakalama'nın diğer tüm örneklerde ve zaman sınırında çalışıyor olacağı anlamına gelir. 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
-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 |
-Exclude
Kapsamda Dışlanacak Makineler
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Include
Kapsama Dahil Edilecek Makineler
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Girişler
String[]
Çıkışlar
İ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