你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureRmNetworkWatcherConnectionMonitorReport
查询最新连接状态的快照。
警告
截至 2024 年 2 月 29 日,AzureRM PowerShell 模块已正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可能正常运行,但它不再维护或受支持,但会根据用户的自由裁量权和风险继续使用任何继续使用模块。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureRmNetworkWatcherConnectionMonitorReport
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherConnectionMonitorReport
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherConnectionMonitorReport
-Location <String>
-Name <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherConnectionMonitorReport
-ResourceId <String>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherConnectionMonitorReport
-InputObject <PSConnectionMonitorResult>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureRmNetworkWatcher连接ionMonitorReport cmdlet 返回有关最新连接状态的报告。
示例
示例 1:按指定位置中的名称获取连接监视器的最新连接快照
PS C:\> Get-AzureRmNetworkWatcherConnectionMonitorReport -Location centraluseuap -Name cm
States : [
{
"ConnectionState": "Reachable",
"StartTime": "2018-01-12T01:18:20Z",
"EvaluationState": "Completed",
"Hops": [
{
"Type": "Source",
"Id": "1530e0f2-c9b7-4bc0-a205-cf7332cd8983",
"Address": "10.1.1.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/appNic0/ipConfigurations/ipconfig1",
"NextHopIds": [
"b19b74b1-423d-4f0b-99cd-bcaed4d0b8a2"
],
"Issues": []
},
{
"Type": "VirtualAppliance",
"Id": "b19b74b1-423d-4f0b-99cd-bcaed4d0b8a2",
"Address": "10.1.2.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/fwNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"80e46c56-2cf9-4106-8602-608a74832d41"
],
"Issues": []
},
{
"Type": "VirtualAppliance",
"Id": "80e46c56-2cf9-4106-8602-608a74832d41",
"Address": "10.1.3.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/auNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"e17cf884-69db-43b8-9cd5-f920770a0dbe"
],
"Issues": []
},
{
"Type": "VirtualNetwork",
"Id": "e17cf884-69db-43b8-9cd5-f920770a0dbe",
"Address": "10.1.4.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/dbNic0/ipConfigurations/ipconfig1",
"NextHopIds": [],
"Issues": []
}
]
},
{
"ConnectionState": "Unreachable",
"StartTime": "2018-01-12T01:14:11Z",
"EvaluationState": "Completed",
"Hops": [
{
"Type": "Source",
"Id": "b6251ff8-3d07-4fdf-98f8-04b168e1cf90",
"Address": "10.1.1.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/appNic0/ipConfigurations/ipconfig1",
"NextHopIds": [
"de6d463b-47fb-4beb-afc4-d77782755313"
],
"Issues": [
{
"Origin": "Local",
"Severity": "Error",
"Type": "NetworkError",
"Context": []
}
]
},
{
"Type": "VirtualAppliance",
"Id": "de6d463b-47fb-4beb-afc4-d77782755313",
"Address": "10.1.2.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/fwNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"0cbadb7e-cd99-4fa9-a832-eb4e0d112293"
],
"Issues": []
},
{
"Type": "VirtualAppliance",
"Id": "0cbadb7e-cd99-4fa9-a832-eb4e0d112293",
"Address": "10.1.3.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/auNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"538005d1-994a-4350-9866-6985385beecf"
],
"Issues": []
},
{
"Type": "VirtualNetwork",
"Id": "538005d1-994a-4350-9866-6985385beecf",
"Address": "10.1.4.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/dbNic0/ipConfigurations/ipconfig1",
"NextHopIds": [],
"Issues": []
}
]
},
{
"ConnectionState": "Reachable",
"StartTime": "2018-01-11T23:54:05Z",
"EvaluationState": "Completed",
"Hops": [
{
"Type": "Source",
"Id": "3dbec7e8-a37f-4acd-bc5f-86918fffba0e",
"Address": "10.1.1.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/appNic0/ipConfigurations/ipconfig1",
"NextHopIds": [
"1a87cf61-1be6-4add-bba7-f84afbcf3726"
],
"Issues": []
},
{
"Type": "VirtualAppliance",
"Id": "1a87cf61-1be6-4add-bba7-f84afbcf3726",
"Address": "10.1.2.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/fwNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"070c0740-308e-43ba-b72f-5d8d5a6537ec"
],
"Issues": []
},
{
"Type": "VirtualAppliance",
"Id": "070c0740-308e-43ba-b72f-5d8d5a6537ec",
"Address": "10.1.3.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/auNic/ipConfigurations/ipconfig1",
"NextHopIds": [
"760182e1-c88d-4cfc-a711-65e7e622a67a"
],
"Issues": []
},
{
"Type": "VirtualNetwork",
"Id": "760182e1-c88d-4cfc-a711-65e7e622a67a",
"Address": "10.1.4.4",
"ResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VarunRgCentralUSEUAP
/providers/Microsoft.Network/networkInterfaces/dbNic0/ipConfigurations/ipconfig1",
"NextHopIds": [],
"Issues": []
}
]
}
]
在此示例中,我们将查询指定连接监视器的最新连接状态。
参数
-AsJob
在后台运行 cmdlet
类型: | SwitchParameter |
Position: | Named |
默认值: | False |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-InputObject
连接ion monitor 对象。
类型: | PSConnectionMonitorResult |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Location
网络观察程序的位置。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Name
连接监视器名称。
类型: | String |
别名: | ConnectionMonitorName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-NetworkWatcher
网络观察程序资源。
类型: | PSNetworkWatcher |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-NetworkWatcherName
网络观察程序的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
网络观察程序资源组的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceId
连接监视器的资源 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
输入
参数:NetworkWatcher (ByValue)
参数:InputObject (ByValue)
输出
PSConnectionMonitorQueryResult
备注
关键字:azure, azurerm, arm, 资源, 连接, 管理, 管理器, 网络, 网络, 网络, 网络观察程序, 连接监视器