Generating Reports for VNETs, Subnet, Connected Devices

Ajaz Akhtar Nawaz 1 Reputation point
2022-06-18T09:00:32.787+00:00

I am seeking instruction how to generate reports from within the Portal.

Information being sought is the number of connected devices per subnet.

The number can be established by viewing 'available ip addresses', but thats too long as we have hundreds of subnets and thousands of VMs.

Thank you

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,644 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Luis Rodriguez 6,221 Reputation points Microsoft Employee
    2022-06-18T09:23:29.52+00:00

    Hello @Ajaz Akhtar Nawaz

    Welcome to Microsoft Q&A Platform,

    Have you tried using Resource Graph? Please check the below article with some sample queries for network resources:

    https://learn.microsoft.com/en-us/azure/networking/fundamentals/resource-graph-samples?tabs=azure-cli

    I hope this helps!

    ----------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Sudipta Chakraborty - MSFT 1,116 Reputation points Microsoft Employee
    2022-06-18T19:06:12.75+00:00

    @Ajaz Akhtar Nawaz :

    You can try out the following Powershell script and export it as CSV :

    $result=Get-AzVirtualNetwork -Name '<vnet name>'  -ResourceGroupName '<group nmae>' -ExpandResource 'subnets/ipConfigurations'   
      
    $result.Subnets[0].IpConfigurations  
    
    0 comments No comments

  3. Ajaz Akhtar Nawaz 1 Reputation point
    2022-07-01T08:07:09.467+00:00

    $result=Get-AzVirtualNetwork -Name ‘AAA-VNET-0001’ -ResourceGroupName ‘AAA-RG-00000002-000’ -ExpandResource 'subnets/ipConfigurations'

    When I run the above script, and btw I know very little about Powershell, I receive the following error:

    Get-AzVirtualNetwork: Resource group 'AAA-RG-00000002-000' could not be found.
    StatusCode: 404
    ReasonPhrase: Not Found
    ErrorCode: ResourceGroupNotFound
    ErrorMessage: Resource group 'AAA-RG-00000002-000' could not be found.
    OperationID : 072b7eb1-cfb2-4140-xxxxxxxxxxx <removed>


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.