你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzureRmNetworkWatcherTopology
获取资源组中的资源及其关系的网络级视图。
警告
AzureRM PowerShell 模块已自 2024 年 2 月 29 日起正式弃用。 为了确保持续获得支持和更新,建议用户从 AzureRM 迁移到 Az PowerShell 模块。
尽管 AzureRM 模块仍可运行,但不再受到维护或支持,任何继续使用的行为都由用户自行决定并自行承担风险。 有关过渡到 Az 模块的指导,请参阅我们的迁移资源。
语法
Get-AzureRmNetworkWatcherTopology
-NetworkWatcher <PSNetworkWatcher>
-TargetResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherTopology
-NetworkWatcherName <String>
-ResourceGroupName <String>
-TargetResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzureRmNetworkWatcherTopology
-Location <String>
-TargetResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzureRmNetworkWatcherTopology cmdlet 是资源组中资源的网络级别视图及其关系。 注意:如果来自多个区域的资源驻留在资源组中,则 JSON 输出中仅包含与网络观察程序相同的区域中的资源。
示例
示例 1:获取 Azure 拓扑
$networkWatcher = Get-AzureRmNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroup NetworkWatcherRG
Get-AzureRmNetworkWatcherTopology -NetworkWatcher $networkWatcher -ResourceGroupName testresourcegroup
Id : e33d80cf-4f76-4b8f-b51c-5bb8eba80103
CreatedDateTime : 0/00/0000 9:21:51 PM
LastModified : 0/00/0000 4:53:29 AM
TopologyResources : [
{
"Name": "testresourcegroup-vnet",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/virtualNetworks/testresourcegroup-vnet",
"Location": "westcentralus",
"TopologyAssociations": [
{
"Name": "default",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/virtualNetworks/testresourcegroup-vnet/subnets/default",
"AssociationType": "Contains"
}
]
},
{
"Name": "default",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/virtualNetworks/testresourcegroup-vnet/subnets/default",
"Location": "westcentralus",
"TopologyAssociations": []
},
{
"Name": "VM0",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Compute/virtualMachines/VM0",
"TopologyAssociations": [
{
"Name": "vm0131",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkInterfaces/vm0131",
"AssociationType": "Contains"
}
]
},
{
"Name": "vm0131",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkInterfaces/vm0131",
"Location": "westcentralus",
"TopologyAssociations": [
{
"Name": "VM0",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Compute/virtualMachines/VM0",
"AssociationType": "Associated"
},
{
"Name": "VM0-nsg",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkSecurityGroups/VM0-nsg",
"AssociationType": "Associated"
},
{
"Name": "default",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/virtualNetworks/testresourcegroup-vnet/subnets/default",
"AssociationType": "Associated"
},
{
"Name": "VM0-ip",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/publicIPAddresses/VM0-ip",
"AssociationType": "Associated"
}
]
},
{
"Name": "VM0-nsg",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkSecurityGroups/VM0-nsg",
"Location": "westcentralus",
"TopologyAssociations": [
{
"Name": "default-allow-rdp",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkSecurityGroups/VM0-nsg/securityRules/default-allow-rdp",
"AssociationType": "Contains"
}
]
},
{
"Name": "default-allow-rdp",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkSecurityGroups/VM0-nsg/securityRules/default-allow-rdp",
"Location": "westcentralus",
"TopologyAssociations": []
},
{
"Name": "VM0-ip",
"Id": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/publicIPAddresses/VM0-ip",
"Location": "westcentralus",
"TopologyAssociations": [
{
"Name": "vm0131",
"ResourceId": "/subscriptions/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb/resourceGroups/testresourcegroup/providers/Microsoft.Network/networkInterfaces/vm0131",
"AssociationType": "Associated"
}
]
}
]
在此示例中,我们在包含 VM、Nic、NSG 和公共 IP 的资源组上运行 Get-AzureRmNetworkWatcherTopology cmdlet。
参数
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Location
网络观察程序的位置。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-NetworkWatcher
网络观察程序资源。
类型: | PSNetworkWatcher |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-NetworkWatcherName
网络观察程序的名称。
类型: | String |
别名: | Name |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-ResourceGroupName
网络观察程序资源组的名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-TargetResourceGroupName
资源组名称。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
输入
参数:NetworkWatcher (ByValue)
参数:NetworkWatcherName (ByValue)
输出
备注
关键字:azure, azurerm, arm, 资源, 管理, 管理器, 网络, 网络, 网络观察程序, 拓扑, 视图
相关链接
- New-AzureRmNetworkWatcher
- Get-AzureRmNetworkWatcher
- Remove-AzureRmNetworkWatcher
- Get-AzureRmNetworkWatcherNextHop
- Get-AzureRmNetworkWatcherSecurityGroupView
- Get-AzureRmNetworkWatcherTopology
- Start-AzureRmNetworkWatcherResourceTroubleshooting
- New-AzureRmNetworkWatcherPacketCapture
- New-AzureRmPacketCaptureFilterConfig
- Get-AzureRmNetworkWatcherPacketCapture
- Remove-AzureRmNetworkWatcherPacketCapture
- Stop-AzureRmNetworkWatcherPacketCapture
- New-AzureRmNetworkWatcherProtocolConfiguration
- Test-AzureRmNetworkWatcherIPFlow
- Test-AzureRmNetworkWatcherConnectivity
- Stop-AzureRmNetworkWatcherConnectionMonitor
- Start-AzureRmNetworkWatcherConnectionMonitor
- Set-AzureRmNetworkWatcherConnectionMonitor
- Set-AzureRmNetworkWatcherConfigFlowLog
- Remove-AzureRmNetworkWatcherConnectionMonitor
- New-AzureRmNetworkWatcherConnectionMonitor
- Get-AzureRmNetworkWatcherTroubleshootingResult
- Get-AzureRMNetworkWatcherReachabilityReport
- Get-AzureRmNetworkWatcherReachabilityProvidersList
- Get-AzureRmNetworkWatcherFlowLogStatus
- Get-AzureRmNetworkWatcherConnectionMonitorReport
- Get-AzureRmNetworkWatcherConnectionMonitor