'Using PowerShell to get the Vnet name by resource ID in Azure

Assuming I have an Azure resource ID Such as:

"/subscriptions/XXXXXXXX/resourceGroups/YYYYYY/providers/Microsoft.ZZZZ/WWWWW/my-resource-name"

How can I find out to which Vnets its connected/sits in using PowerShell commands?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source