Get list of Vnets of resource group sort by created time

Thai Nguyen 1 Reputation point
2020-06-26T08:16:06.29+00:00

I need get VNets of a resource group. The result should be sort by created time of vnet. How can do that?

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,264 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. TravisCragg-MSFT 5,681 Reputation points Microsoft Employee
    2020-07-09T02:09:55.667+00:00

    Getting a list of VNETs in a Resource Group is easy. You can do that in the portal by selecting a Resource Group, and then setting 'type' equal to 'Virtual Networks'

    11662-2020-07-08-19-01-36-inbox-traviscragg.png

    You can do this in PowerShell using the Get-AzVirtualNetwork cmdlet and specify a Resource Group.

    what is MUCH harder about this question, is sorting by creation date. Azure does not save the creation date on your resource. Unless you add a tag with the creation date, the only way to get a creation date is to use Azure Activity Log to search for the creation operation of the resource. These logs are only saved for 90 days, so if the resource was created more than 90 days ago, there is no way to find the creation date.

    0 comments No comments