Skip to content

Instantly share code, notes, and snippets.

@cinek810
Created October 19, 2017 20:48
Show Gist options
  • Save cinek810/6e7bdffeaf961a9c6ef5d753bf926956 to your computer and use it in GitHub Desktop.
Save cinek810/6e7bdffeaf961a9c6ef5d753bf926956 to your computer and use it in GitHub Desktop.
[cinek@plkra-mas01 ~]$ az resource list -g TestGroup --query "[?contains(id,'testVMName')].{resourceName: name}" -o table
ResourceName
--------------------------------------------------
testVMName_disk1_e75506fcb6cb4205aee4a1fc5fea0691
testVMName_disk2_130becbc24874ea7a810255152459681
testVMName
testVMNameVMNic
testVMNameNSG
testVMNamePublicIP
[cinek@plkra-mas01 ~]$ az resource list -g TestGroupt --query "[?contains(id,'testVMName')]" -o table
Name ResourceGroup ManagedBy
Location
-------------------------------------------------- ------------------- ----------------------------------------------------------------------------------------------------
------------------------------------------ ----------
testVMName_disk1_e75506fcb6cb4205aee4a1fc5fea0691 TESTGROUP /subscriptions/2acd5a86-da24-4bde-8f81-388f40143d4f/resourceGroups/TestGroup/providers/Microsoft.Comp
ute/virtualMachines/testVMName westeurope
testVMName_disk2_130becbc24874ea7a810255152459681 TESTGROUP /subscriptions/2acd5a86-da24-4bde-8f81-388f40143d4f/resourceGroups/TestGroup/providers/Microsoft.Comp
ute/virtualMachines/testVMName westeurope
testVMName TestGroup
westeurope
testVMNameVMNic TestGroup
westeurope
testVMNameNSG TestGroup
westeurope
testVMNamePublicIP TestGroup
westeurope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment