Test-AzureRmNetworkWatcherConnectivity
Mengembalikan informasi konektivitas untuk VM sumber tertentu dan tujuan.
Peringatan
Modul AzureRM PowerShell telah resmi tidak digunakan lagi per 29 Februari 2024. Pengguna disarankan untuk bermigrasi dari AzureRM ke modul Az PowerShell untuk memastikan dukungan dan pembaruan yang berkelanjutan.
Meskipun modul AzureRM mungkin masih berfungsi, modul tersebut tidak lagi dipertahankan atau didukung, menempatkan penggunaan berkelanjutan berdasarkan kebijaksanaan dan risiko pengguna. Silakan merujuk ke sumber daya migrasi kami untuk panduan tentang transisi ke modul Az.
Sintaks
Test-AzureRmNetworkWatcherConnectivity
-NetworkWatcher <PSNetworkWatcher>
-SourceId <String>
[-SourcePort <Int32>]
[-DestinationId <String>]
[-DestinationAddress <String>]
[-DestinationPort <Int32>]
[-ProtocolConfiguration <PSNetworkWatcherProtocolConfiguration>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzureRmNetworkWatcherConnectivity
-NetworkWatcherName <String>
-ResourceGroupName <String>
-SourceId <String>
[-SourcePort <Int32>]
[-DestinationId <String>]
[-DestinationAddress <String>]
[-DestinationPort <Int32>]
[-ProtocolConfiguration <PSNetworkWatcherProtocolConfiguration>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Test-AzureRmNetworkWatcherConnectivity
-Location <String>
-SourceId <String>
[-SourcePort <Int32>]
[-DestinationId <String>]
[-DestinationAddress <String>]
[-DestinationPort <Int32>]
[-ProtocolConfiguration <PSNetworkWatcherProtocolConfiguration>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Deskripsi
Cmdlet Test-AzureRmNetworkWatcherConnectivity mengembalikan informasi konektivitas untuk VM sumber tertentu dan tujuan. Jika konektivitas antara sumber dan tujuan tidak dapat dibuat, cmdlet mengembalikan detail tentang masalah tersebut.
Contoh
Contoh 1: Menguji Konektivitas Network Watcher dari VM ke situs web
Test-AzureRmNetworkWatcherConnectivity -NetworkWatcherName NetworkWatcher -ResourceGroupName NetworkWatcherRG -SourceId "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoRG/providers/Microsoft.Compute/virtualMachines/MultiTierApp0" -DestinationAddress "bing.com" -DestinationPort 80
ConnectionStatus : Reachable
AvgLatencyInMs : 4
MinLatencyInMs : 2
MaxLatencyInMs : 15
ProbesSent : 15
ProbesFailed : 0
Hops : [
{
"Type": "Source",
"Id": "f8cff464-e13f-457f-a09e-4dcd53d38a85",
"Address": "10.1.1.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ContosoRG/provi iders/Microsoft.Network/networkInterfaces/appNic0/ipConfigurations/ipconfig1",
"NextHopIds": [
"1034b1bf-0b1b-4f0a-93b2-900477f45485"
],
"Issues": []
},
{
"Type": "Internet",
"Id": "1034b1bf-0b1b-4f0a-93b2-900477f45485",
"Address": "13.107.21.200",
"ResourceId": "Internet",
"NextHopIds": [],
"Issues": []
}
]
Dalam contoh ini, kami menguji konektivitas dari VM di Azure ke www.bing.com.
Parameter
-AsJob
Jalankan cmdlet di latar belakang
Jenis: | SwitchParameter |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DefaultProfile
Kredensial, akun, penyewa, dan langganan yang digunakan untuk komunikasi dengan azure.
Jenis: | IAzureContextContainer |
Alias: | AzureRmContext, AzureCredential |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DestinationAddress
Alamat IP atau URI sumber daya tempat upaya koneksi akan dilakukan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DestinationId
ID sumber daya tempat upaya koneksi akan dilakukan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-DestinationPort
Port di mana konektivitas pemeriksaan akan dilakukan.
Jenis: | Int32 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-Location
Lokasi pengamat jaringan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | False |
Terima karakter wildcard: | False |
-NetworkWatcher
Sumber daya pengamat jaringan.
Jenis: | PSNetworkWatcher |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-NetworkWatcherName
Nama pengamat jaringan.
Jenis: | String |
Alias: | Name |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-ProtocolConfiguration
Konfigurasi protokal di mana konektivitas pemeriksaan akan dilakukan.
Jenis: | PSNetworkWatcherProtocolConfiguration |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | False |
Terima karakter wildcard: | False |
-ResourceGroupName
Nama grup sumber daya pengamat jaringan.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-SourceId
ID sumber daya tempat pemeriksaan konektivitas akan dimulai.
Jenis: | String |
Position: | Named |
Nilai default: | None |
Diperlukan: | True |
Terima input alur: | True |
Terima karakter wildcard: | False |
-SourcePort
Port sumber tempat pemeriksaan konektivitas akan dilakukan.
Jenis: | Int32 |
Position: | Named |
Nilai default: | None |
Diperlukan: | False |
Terima input alur: | True |
Terima karakter wildcard: | False |
Input
Parameter: NetworkWatcher (ByValue)
Output
Catatan
Kata kunci: azure, azurerm, arm, sumber daya, konektivitas, manajemen, manajer, jaringan, jaringan, network watcher
Link Terkait
- New-AzureRmNetworkWatcher
- Get-AzureRmNetworkWatcher
- Remove-AzureRmNetworkWatcher
- Get-AzureRmNetworkWatcherNextHop
- Get-AzureRmNetworkWatcherSecurityGroupView
- Get-AzureRmNetworkWatcherTopology
- Get-AzureRmNetworkWatcherTroubleshootingResult
- New-AzureRmNetworkWatcherPacketCapture
- New-AzureRmPacketCaptureFilterConfig
- Get-AzureRmNetworkWatcherPacketCapture
- Remove-AzureRmNetworkWatcherPacketCapture
- Stop-AzureRmNetworkWatcherPacketCapture
- Start-AzureRmNetworkWatcherResourceTroubleshooting
- New-AzureRmNetworkWatcherProtocolConfiguration
- Test-AzureRmNetworkWatcherIPFlow
- Test-AzureRmNetworkWatcherConnectivity
- Stop-AzureRmNetworkWatcherConnectionMonitor
- Start-AzureRmNetworkWatcherConnectionMonitor
- Set-AzureRmNetworkWatcherConnectionMonitor
- Set-AzureRmNetworkWatcherConfigFlowLog
- Remove-AzureRmNetworkWatcherConnectionMonitor
- New-AzureRmNetworkWatcherConnectionMonitor
- Get-AzureRMNetworkWatcherReachabilityReport
- Get-AzureRmNetworkWatcherReachabilityProvidersList
- Get-AzureRmNetworkWatcherFlowLogStatus
- Get-AzureRmNetworkWatcherConnectionMonitorReport
- Get-AzureRmNetworkWatcherConnectionMonitor