Get-AzNetworkWatcherTopology -NetworkWatcher $networkWatcher -TargetResourceGroupName $rgNameVNet $networkWatcher = Get-AzNetworkWatcher -Name $networkWatcherName -ResourceGroupName $networkWatcherResourceGroup # Get the properties of the Network Watcher $global:currenttime= Set-PSBreakpoint -Variable currenttime -Mode Read -Action \Get-Network-Level-View-of-a-VNet.ps1 nw-hub-myh-we-01 rg-hub-myh-networking-01 \Get-Network-Topology-of-a-VNet-in-JSON-format.ps1 Set-AzContext -Subscription "" (if not using the default subscription) Next to that if you are using multiple Azure subscriptions, select the proper subscription with the Set-AzContext cmdlet before running the script. Keep in mind that if you are not running the script from Cloud Shell, like when you are using Windows Terminal, you first need to sign in with the Connect-AzAccount cmdlet to connect with an authenticated account. Or you can simply run it from Cloud Shell. Then run the script with Administrator privileges from Windows Terminal, Visual Studio Code, or Windows PowerShell. To use the script copy and save it as Get-Network-Topology-of-a-VNet-in-JSON-format.ps1 or download it from GitHub. Just keep in mind that if resources from multiple regions reside in the resource group, that only the resources in the same region as the Network Watcher will be included in the JSON output. This output will give you a network level view of all networking resources and their relationships from a specific resource group. You can use the below Azure PowerShell script to get the network topology of a VNet in a JSON output. View a network topology in JSON format with Network Watcher using an Azure PowerShell script Afterwards, you can also use this image to add it in any documentation you want, like for example an Azure environment assessment or a Low-Level Design (LLD). ![]() svg file with Edge or any other modern web browser). When the topology.svg file is downloaded, just click on it to see the VNEt’s network topology (you can view an. Next to this, if you also want to download the topology in SVG file format, you just need to click on Download topology. You can now use this generated topology to analyze, troubleshoot issues, or even identify misconfigurations in this VNet. Select a Subscription, the Resource Group of a VNet (all resource groups under the chosen subscription that have a VNet are automatically shown in a drop-down list) you want to view the topology for, and then select the VNet itself. When all are selected the topology of the selected VNet will be shown, like you can also see on the below picture. In the Network Watcher screen (blade), select Topology under the Monitoring section. Logon to the Azure Portal and type in “ network watcher” in the Global search bar. View a network topology with Network Watcher using the Azure Portal
0 Comments
Leave a Reply. |