< Back

Get-AzureRmNetworkWatcherTopology

Tue Jan 29, 2019 9:54 pm

NAME Get-AzureRmNetworkWatcherTopology



SYNOPSIS

Gets a network level view of resources and their relationships in a resource group.





SYNTAX

Get-AzureRmNetworkWatcherTopology [-DefaultProfile <IAzureContextContainer>] -NetworkWatcher <PSNetworkWatcher> -TargetResourceGroupName <String>

[<CommonParameters>]



Get-AzureRmNetworkWatcherTopology [-DefaultProfile <IAzureContextContainer>] -NetworkWatcherName <String> -ResourceGroupName <String>

-TargetResourceGroupName <String> [<CommonParameters>]





DESCRIPTION

The Get-AzureRmNetworkWatcherTopology cmdlet a network level view of resources and their relationships in a resource group. Note: If resources

from multiple regions reside in the resource group, only the resources in the same region as the Network Watcher will be included in the JSON

output.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-NetworkWatcher <PSNetworkWatcher>

The network watcher resource.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-NetworkWatcherName <String>

The name of network watcher.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the network watcher resource group.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TargetResourceGroupName <String>

The resource group name.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Microsoft.Azure.Commands.Network.Models.PSNetworkWatcher

System.String





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSTopology







NOTES





Keywords: azure, azurerm, arm, resource, management, manager, network, networking, network watcher, topology, view



-------------------------- Example 1: Get an Azure Topology --------------------------



$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/vir

tualNetworks/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/vir

tualNetworks/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/net

workSecurityGroups/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"

}

]

}

]



In this example we run the Get-AzureRmNetworkWatcherTopology cmdlet on a resource group that contains a VM, Nic, NSG, and public IP.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... ertopology

New-AzureRmNetworkWatcher

Get-AzureRmNetworkWatcher

Remove-AzureRmNetworkWatcher

New-AzureRmNetworkWatcherPacketCapture

New-AzureRmPacketCaptureFilterConfig

Get-AzureRmNetworkWatcherPacketCapture

Remove-AzureRmNetworkWatcherPacketCapture

Stop-AzureRmNetworkWatcherPacketCapture

Test-AzureRmNetworkWatcherIPFlow

Get-AzureRmNetworkWatcherNextHop

Get-AzureRmNetworkWatcherSecurityGroupView

Start-AzureRmNetworkWatcherResourceTroubleshooting