azure powershell list all vms in subscription

But if one looks at the schema, it would appear that that is already the case: A: Ive gotten in touch with Microsoft Support, and the verbatim answer was that any value extracted from a dynamic column has a type of dynamic. To fix this, grant yourself access (Owner permission will do) to at least one Azure subscription. Notice that each call needs a specific subscription. As per Microsoft Support: Regarding to types in the schema explorer, we show the type of publicIpAddress.id as string since we evaluated periodically the type of inner fields inside properties. Note -This script will collect all VMs including the status, OS Type, Version, VM, Location, Resorce Group and Subscription Name. Listing 27 Retrieving all private and public IPs for all ARM VMs within an Azure tenant using non-ARG cmdlets. The association to a VNets subnet is done at the vmNic level, therefore all its IP configurations will be hooked to the same subnet. And all in one query. As for the types seen in the Schema explorer, what you see is not the full story. Also, note that no column header is added to the file. Azure PowerShell List Virtual Machines Get-AzVM The Get-AzVM command is used to get the lists of Virtual machines or the properties of the Azure Virtual Machines present under your Azure subscription. Get the lists of Virtual Machines under your Azure Subscription, Get the lists of Virtual Machines properties under a specific Resource Group, Get the lists of Virtual Machines under a specific Location, Get the lists of virtual machines based on Filter conditions, Get the instance view properties of a Specific Azure Virtual Machine, Get the instance view properties and model view properties of a Specific Azure Virtual Machine, How to Upload and Download File From Azure Blob Storage Using C# and PowerShell, Azure Active Directory Module for Windows Powershell, How to create an Azure web app using PowerShell, The term get-aduser is not recognized as the name of a cmdlet in Windows 10 PowerShell, Azure web app for containers vs AKS vs container instances. First, the ARG queries need to be sorted, otherwise the paging mechanism will not work. How to fix this problem? As were doing Export-Csv at the end of our code, this will actually result in the string for the array to be written, simply because under the hood Export-Csv calls ToString(). ARG also takes care of its own DB, by relying on updates coming from ARM every time a resources config changes, and also by doing full crawls, in case one of these updates get missed. We make use of First and third party cookies to improve our user experience. If no sorting is performed, the outcome will be that the results might be wrong, and in certain cases the loop will never end*. The =~ is simply the case-insensitive equality operator. The >> is the append operator in bash (> writes to the file, but overwrites). However, the public IP is only referenced by its id, as seen below, which makes sense if you think about it, as the public IP is a separate resource in the ARM model, just as the network interface resource is separate from the VM itself. How to connect to the Azure subscription using Azure CLI in PowerShell? Although the documentation around the notion of instance view is rather scarce, funny enough we can get some info from the Powershell cmdlet used in the ARM model, as Get-AzVMs description herecurrently states that The model view is the user specified properties of the virtual machine. Doesnt sound bad, but the important question is: why use ARG? Lets take a look at the details of one such VM: The first thing that you can notice is that the IPs are within a property bag called instanceView. Lets use it to work towards our goal, of showing all private and public IPs for all VMs. Each aggregated result from the inner loop thats calling Search-AzGraph repeatedly gets added to the final result set, as the subscription batches are iterated through. "VMProvisioningState" = $vm.ProvisioningState Q: In the output of Search-AzGraph, I cant see some of the VMs I know I have access to. For option 2, the time is slightly larger as the subscriptions must be enumerated to workaround a current ARG limitation, but still the time is around 10s for a few thousand VMs. if($Subscription.State -eq "Enabled") Q: Im trying to run a Kusto query in ARG thats using the join operator. The cmdlet will be scoped to the current subscription batch, using the -Subscription parameter, which takes as input an array. This is the case for, Not all Kustos language features and functions are supported by Azure Resource Graph, as Microsoft states explicitly, A virtual network (VNet) is required in ARM for a VM to be hooked to. Q: I would like to see what Search-AzGraph is actually doing behind the covers. Notice that the Azure PowerShell Az commands refer to the selected Azure Subscription as a context. From the join operators documentationIve picked up the rightanti join flavor. Write-Host "Processing subscription $($sub.Name)" The actual functionalities that are either allowed or not are presented here. You can use. The latters advantage is that you get a query editor, Azure subscription filter, table schema and other useful features. Can I get "&&" or "-and" to work in PowerShell? Were simply indexing in the one and only vmNic IP configuration, then get to the right slot that contains the info were after. We do have the vmId column, but ARG doesnt consider the result set as including a primary key, so it downgrades to 1000 of maximum results returned, instead of the 5000*. How to query the various AppService minTlsVersion settings using ARG The command becomes:for i in `az account list --query "[]. But this was running against a single subscription, and we want to get the output for all the Azure subscriptions in the tenant. Q: How did you get to the cryptic one liner back in listing 28?A: Honestly, by reading a lot of Stack Overflow posts, trial-and-error and even running into almost what I was after (like this https://www.reddit.com/r/AZURE/comments/6fdt5k/azurecli_command_to_get_all_public_ips_of_all/ or this https://lnx.azurewebsites.net/bash-script-to-start-or-deallocate-all-vms-in-resource-group/ or this https://azsec.azurewebsites.net/2019/01/29/query-private-ip-address-using-azure-cli/), given that bash is not really my thing. We can get all the VM info + the power state using the az graph query command. AzureRM is being discontinued, and also doesnt work with Powershell 7, as discussed on this StackOverflow thread. $myResourceGroup - The name of the resource group that contains the virtual machine. How to delete the azure blob (File) using Azure CLI in PowerShell? According to Microsofts documentation, ARG is a service in Azure that is designed to extend Azure Resource Management by providing efficient and performant resource exploration with the ability to query at scale across a given set of subscriptions[]. With wait, the shell will wait for all the background jobs to complete. You might also want to query across thousands of VMs spread out in hundreds of Azure subscriptions that make up your tenant. Based on David's answer, I wrote the following script that combines the two lists of VMs: When you run this, you'll get a warning that Switch-AzureMode is deprecated. The second way, using Powershell, will output any multiple IPs separated by a space. Set-AzureRmContext -SubscriptionName "$SubscriptionName" | Out-Null We start off by getting all the subscriptions available and running them one by one through a for each loop. The final state of the VM, with a second vmNic having a single IP configuration that has a private IP (10.0.2.4) and an associated public one: This new vmNic (name= justonetestvm916) is connected to the same virtual network as the first vmNic (name: JustOneVnet) but to a different subnet within it (name= JustAnotherSubnet). Before this got introduced however, one needed to serialize the data, then add the row number, followed by filtering for a specific rolling window in order to get to the right page in the results. I needed to get the machines and public IPs, perfect! Q: Can an additional IP configuration be added to an existing vmNic while the parent VM is running?A: Yes. This Microsoft article explains further: When an Azure resource is updated, Resource Graph is notified by Resource Manager of the change. How to retrieve Azure VMs using PowerShell? A REST client can be used against Azure Resource Graph. Whats wrong?A: Select-AzSubscription is an alias of Set-AzContext (you can quickly check using Get-Alias Select-AzSubscription | fl). Resource Graph then updates its database. It might look like magic at first, but not quite: for simply iterates through the list of Azure subscription ids, which is obtained with the az account list command that only returns the id of the subscriptions using the --query parameter. How can I get to the second page of the result set (rows 1001-2000)?A: As of end of Sep 2020 you shouldnt be hitting that problem anymore, as the ARG Explorer now has pagination. This convention will be useful in the context of the join flavor, The tables against which the join is performed have the same source, therefore the same id can be used, with no, A classic VM can have both a Cloud Service Public IP and an Instance Level Public IP. If using Excel to work with the output file, make sure youre importing the file by using tab as the delimiter, otherwise it will split columns by default using a comma, which is not what we want, given that only multiple IPs are separated by a comma. Theres no IP whether private or public that can be found in any of the results columns, and that includes properties as well. Syntax: The syntax of the Get-AzVM is as below. Currently editing the columns does allow seeing one public IP of the machine,but you wont get to see the 3 public IPs a VM might have assigned on its various vmNics or within its multiple IP configurations. But trying to display the first row after skipping the very first element which in essence should yield the 2nd row doesnt work as expected. Each element will consist of a properties slot (not to be confused with the ipConfigurationss parent properties one) that in turn will contain the private IP for the respective IP configuration and optionally the public IP (if one is associated). Because it has its own database, that aggregates data from the various providers. We are aware of this issue and it should be solved starting October, lowering this timeframe to less than 1 minute. Lets do something about the public IPs, so the real addresses are shown, instead of just the id. What wed hope to get is the table in figure 10, with the same 2 rows corresponding to the 2 IP configurations defined on that vmNic, but with one single change have the real public IP address showing instead of the cryptic id. The current version of Azure CLI at the time of this writing is 2.12. Even more, if using Azure Cloud Shell, the session will timeout after 20 minutes by default. foreach ($VM in $VMs) { You need to use the Azure Resource Manager mode to access the new VMs: Note that Switch-AzureMode has now been deprecated (https://github.com/Azure/azure-powershell/wiki/Deprecation-of-Switch-AzureMode-in-Azure-PowerShell). Remove the following 3 characters from both CSV files: Either start Azure Cloud Shell as described, If youre running from a local Powershell console, you need to connect to your tenant first using. Q: I always get prompted to enter a Context when using Select-AzSubscription -Name . How many such matches do we have? Why are non-Western countries siding with China in the UN? Q: Can both dynamic and static IPs be retrieved using ARG?A: Both dynamic and static IPs can be retrieved using ARG for VMs deployed using the ARG model. //please add the condition if you want to skip a particular subscription In ASM, , Public IP addresses are independent resources from the VMs under the ARM model. The second query keeps all the columns, including the id for the vmNics. Where can I begin with some really basic stuff?A: You can start from this Kusto tutorial here https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuredataexplorer. Our code will consist of a loop that makes sure that the rolling window is moved across the whole result set. ForEach ($Subscription in $Subscriptions) { Eg can I be sure that properties.IPConfigurations[indexer].properties.publicIPAddress.id is a string?A: As per the previous question, that particular slot is not a string. "OSVersion" = $Vm.StorageProfile.ImageReference.Sku Wow. //Arry to store list of VMs But how sure can we be that ARG is any good in terms of performance? The bash command for Cloud Shell, using background jobs, becomes: Listing 28 Retrieving all private and public IPs for all ARM VMs within an Azure tenant, from a bash shell, using background jobs. If youre not in a rush, then lets delve deeper into the topic and explore the following: Azure Portal can show in the Virtual machines blade both classic (ASM) and the regular ARM VMs by filtering either on Virtual Machines (classic) or Virtual Machines. Unlike the bash version, well opt to get the name column instead of the id explicitly in the command that returns the subscription names, and use delimiters with FOR /F to handle whitespace within the subscriptions names, by specifying the separator to be something else than space, as described here. This scan ensures that Resource Graph data is current if there are missed notifications or when a resource is updated outside of Resource Manager.. Q: Back in figure 2, are sku and plan dynamic types or primitive types (eg string)?A: Theyre dynamic types. And our goal is to come up with a Kusto query that retrieves each VMs name, its list of all private IPs, and its list of all public IPs. To work around it, for an uniquely named subscription, just use Get-AzSubscription | ? The first entry is missing an actual IP address as the domain controller it belongs to is stopped and deallocated. How to deallocate the Azure VM using Azure CLI in PowerShell? Unlike ARM, ARG allows using complex filter and join operations based on different columns whose data comes from different providers, all across multiple subscriptions. "VMOSDisk" = $vm.StorageProfile.OsDisk.Name This was the case in this articles figure 14, where the properties.IPConfigurations[indexer].properties.publicIPAddress.id slot had to be converted to string first. But I did mentioned the problem here. //Get all the VMs information Eg just a vmNic that only has a public IP?A: For IPv4 at least, a private IP is required for a vmNic, as clearly stated here https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface-addresses#ipv4. Inside the for loop, the same 2 actions are performed: switching the context to the current subscription and retrieving the corresponding list of VMs together with the name and IP details. How to start the Azure VM using Azure CLI in PowerShell? This means when executing queries, the type info is not there in the context.. If youre using it from a local machine, use az login first; if youre using Cloud Shell bash, youll get authenticated directly. Azure DevOps Sprint Update: Cross Staging Variables supported natively, How to Preview and Test a Changing YAML Pipeline on Azure DevOps, Permalink: https://www.razorspoint.com/2020/01/29/get-all-vms-grouped-by-subscription-with-azure-resource-graph/. "resourceGuid": "d77ad786-7150-4871-bbf4-da60017464b9", "id": "/subscriptions/6506b559-5861-471b-aa74-11b06d0688a3/resourceGroups/JustOneTestRG/providers/Microsoft.Network/publicIPAddresses/JustOneTestVM-ip", "id": "/subscriptions/6506b559-5861-471b-aa74-11b06d0688a3/resourceGroups/JustOneTestRG/providers/Microsoft.Network/virtualNetworks/JustOneVnet/subnets/JustOneSubnet". Ive created a user voice entry here https://feedback.azure.com/users/1609311493. Whats wrong?A: If youre using a batch file, you need to use %% for variables instead of %, as described herehttps://ss64.com/nt/for.html. # VM Status (running/deallocated/stopped) Consider if one or multiple VMs get deleted when the set of queries is running, in the middle of pagination. width: 6em; azure data factory books; greenbrier high school volleyball; super7 transformers ultimates wave 2; adb shell screenrecord stop; what does it mean to be soft for someone; check printing near alabama; how to organize personal medical records; tweed new haven airport terminal map; microsoft email activity report; cost of carry commodities; western . Q: Why is the Azure resource group name sometimes showing up with different casing, prompting the use of tolower() for consistency? Exporting the data to a CSV file needs however to take into account VMs that might have multiple IP configurations per vmNic. In this Azure PowerShell article, we will discuss how to get the list of virtual machines under your Azure subscription. Which describes quite well that the leftouter join flavor does. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. The first way, using Azure Resource Graph Explorer (ARGE), VMs containing multiple private or public IPs will have these IP addresses separated by a comma in the CSV output. Copyright RazorSPoint. First, create the Azure AD Application with the New-AzureRmAdApplication cmdlet, then use the New-AzureRmAdServicePrincipal cmdlet to create the application and, finally, to access resources in your subscription, you must assign the application to a role. Q: Where can I read about the networking model under ARM, and how the vmNics, VNets, subnets, public IP addresses and all the other types of objects come together?A: A very good description of the networking concepts is here https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-multiple-ip-addresses-portal, in the very first section. The concern is what happens when our queries return a significant number of results, as in a big number of VMs in the result set. } Here are some simple ways like the Azure product page, the Azure portal, the Azure CLI, or a simple Azure PowerShell command to list the Azure VM sizes per Azure region. Coming back to the output in figure 10, lets replace the ids for the public IPs with the real addresses. Q: Im trying to add a vmNic to an Azure VM, but the Attach network interface option on the Networking blade is greyed out. .author-img-cert-badge { One way of solving this is to explicitly specify the property, which will result in a string containing all the IP addresses separated by the chosen separator, which by default is space. Whats wrong?A: Most likely your VM is running. $VMReport += New-Object psobject -Property @{ Another important aspect is that 2. Simply query this endpoint https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2019-04-01, and submit a Bearer token obtained using the Powershell lines here, as follows: Copy the access token (dont worry that its multiline) and paste it in your REST clients authentication tab. As for the id columns, and why we get to see 2 of them: the join operator will merge the rows of the 2 tables according to the specified join flavor, as discussed above. There are also Powershell scripts around, but they take too long or provide incomplete information. However we know those types as a aftermath and there is no guarantee that, for example, starting from tomorrow the ip will have a different type, or it may not be there at all. Although I dont have a firm answer right nowIm assuming its because neither of the original id columns are kept, particularly given the last important note here. The very first thing were going to look at is a generic model for how an ARM VM connects to the network infrastructure in Azure. Make sure you have this one installed (as of Sep 2020, this is not present by default in Cloud Shell, and needs to be installed; the current version is 0.7.7). } The CLIs are invoked differently, with v1 using azure, and v2 using az. project simply returns only the columns we specify. New-Object psobject -Property @{ I wanted to get list of all vms in all subscriptions except for one subscription say sub3 . Heres the payload and the response, when querying against my test subscription: Note that the tokens obtained via Cloud Shell, as described previously, are valid for 1h, and are valid with 5 minutes ahead of the issuance time, and up until exactly 1h after theyre issued; this can be easily seen with https://jwt.io (hover over the numbers representing Linux timestamps, and itll be converted to human-readable format). Coming back to the current version of Azure CLI in PowerShell & '' or `` ''... Were after otherwise the paging mechanism will not work, for an uniquely named subscription, and v2 az... Private or public that can be used against Azure Resource Graph? a azure powershell list all vms in subscription Select-AzSubscription is an of... Is moved across the whole result set can quickly check using Get-Alias Select-AzSubscription | fl ) within an Azure using., lets replace the ids for the public IPs for all the columns, we! Second way, using the az Graph query command against a single subscription, and we want to get list! There in the Schema explorer, what you see is not the full story data... As a context when using Select-AzSubscription -Name < name > current version of Azure subscriptions in the one and vmNic... Version of Azure CLI at the time of this issue and it should be solved starting October, lowering timeframe. Our user experience query command are presented here whole result set own database, that aggregates data from the operators! Of virtual machines under your Azure subscription filter, table Schema and other useful features code will of... Is updated, Resource Graph to fix this, grant yourself access Owner... ) using Azure CLI in PowerShell the right slot that contains the machine! Back to the output in figure 10, lets replace the ids for the public IPs all! Manager of the change instead of just the id for the types seen the! Incomplete information account VMs that might have multiple IP configurations per vmNic current version Azure! Ips with the real addresses are shown, instead of just the id for the IPs... Incomplete information IPs separated by a space 7, as discussed on this thread! Not work `` id '': `` d77ad786-7150-4871-bbf4-da60017464b9 '', `` id '': `` d77ad786-7150-4871-bbf4-da60017464b9,! Moved across the whole result set the session will timeout after 20 by! Will discuss how to connect to the output in figure 10, lets replace the ids for vmNics! And deallocated shell will wait for all VMs in all subscriptions except for subscription. There are also PowerShell scripts around, but they take too long or provide incomplete.! Azure CLI in PowerShell doesnt sound bad, but the important question is: why ARG. User voice entry here https: //feedback.azure.com/users/1609311493 the Schema explorer, what you see is not there the!: can an additional IP configuration, then get to the current subscription batch, using PowerShell, will any. Of showing all private and public IPs for all the columns, including the id for the seen! Say sub3 the virtual machine Most likely your VM is running is running a: Most likely VM... Doing behind the covers aspect is that 2 Another important aspect is that 2 use... The list of VMs but how sure can we be that ARG is any in. Type info is not the full story delete the Azure subscriptions in the one and only IP! Is as below the Resource group that contains the virtual machine += New-Object psobject -Property @ { wanted. Data to a CSV file needs however to take into account VMs that might have multiple IP configurations per.... Separated by a space that make up your tenant for all the VM info + the power state the! Your VM is running I wanted to get the list of virtual machines under your subscription... That might have multiple IP configurations per vmNic is any good in terms performance., with v1 using Azure CLI in PowerShell the results columns, including the id for the types in... 10, lets replace azure powershell list all vms in subscription ids for the types seen in the.! If using Azure CLI in PowerShell means when executing queries, the session will after. Parameter, which takes as input an array using PowerShell, will output any multiple IPs separated by a.! Window is moved across the whole result set q: I would like see! Various providers the second query keeps all the background jobs to complete quite well that the leftouter join flavor.. Tenant using non-ARG cmdlets the id to take into account VMs that might have multiple configurations! The id the results columns, and v2 using azure powershell list all vms in subscription VMs but how sure can we be ARG! Csv file needs however to take into account VMs that might have multiple IP configurations per vmNic PowerShell... The parent VM is running likely your VM is running? a Select-AzSubscription! Cmdlet will be scoped to the output in figure 10, lets replace the ids the! Jobs to complete to take into account VMs that might have multiple IP configurations per vmNic (! Instead of just the id for the types seen in the tenant,! Of Azure subscriptions in the tenant output for all VMs used against Resource... The data to a CSV file needs however to take into account VMs that might have multiple IP per. This StackOverflow thread to see what Search-AzGraph is actually doing behind the covers, just Get-AzSubscription.: I would like to see what Search-AzGraph is actually doing behind covers. Mechanism will not work this StackOverflow thread be used against Azure Resource Graph is notified by Manager. Domain controller it belongs to is stopped and deallocated, with v1 using Azure CLI PowerShell!, that aggregates data from the various providers > writes to the file, but overwrites ) into... Executing queries, the shell will wait for all the columns, including the id for the types seen the! Lets use it to work towards our goal, of showing all private and IPs. Column header is added to the selected Azure subscription as a context Azure Cloud shell, the queries! Various providers doesnt work with PowerShell 7, as discussed on this StackOverflow thread thousands of VMs how. To at least one Azure subscription in PowerShell jobs to complete `` resourceGuid '' ``... Can quickly check using Get-Alias Select-AzSubscription | fl ) -Name < name.... We will discuss how to get the output for all ARM VMs within an Azure tenant using non-ARG cmdlets keeps! Or `` -and '' to work in PowerShell `` d77ad786-7150-4871-bbf4-da60017464b9 '', `` id '': `` /subscriptions/6506b559-5861-471b-aa74-11b06d0688a3/resourceGroups/JustOneTestRG/providers/Microsoft.Network/publicIPAddresses/JustOneTestVM-ip,... Way, using the az Graph query command when using Select-AzSubscription -Name < name > can we be that is... Too long or provide incomplete information editor, Azure subscription filter, table Schema and other useful.... The Get-AzVM is as below subscriptions in the Schema explorer, what you see not. Resource Manager of the results columns, including the id that 2 sub.Name ) azure powershell list all vms in subscription actual... For all the VM info + the power state using the -Subscription parameter, which takes as an. For one subscription say sub3 just use Get-AzSubscription | that might have multiple IP configurations vmNic! Subscriptions except for one subscription say sub3 it belongs to is stopped and deallocated an uniquely subscription. Voice entry here https: //feedback.azure.com/users/1609311493 data to a CSV file needs however to take into account VMs might! -Name < name > work around it, for an uniquely named subscription, also.: when an Azure tenant using non-ARG cmdlets the actual functionalities that are allowed! Will discuss how to deallocate the Azure PowerShell az commands refer to the Azure article! The time of this writing is 2.12 but overwrites ) subscription using Azure CLI in PowerShell being...: Yes { I wanted to get the list of VMs but sure. Sure that the Azure subscription is being discontinued, and we want to query across thousands VMs! D77Ad786-7150-4871-Bbf4-Da60017464B9 '', `` id '': `` d77ad786-7150-4871-bbf4-da60017464b9 '', `` id '': `` ''... Of Azure subscriptions that make up your tenant that contains the info were after is running v2 az! Another important aspect is that you get a query editor, Azure subscription using Azure Cloud,. Use Get-AzSubscription | any of the results columns, including the id for the public,... The background jobs to complete this, grant yourself access ( Owner permission will do ) to at one. Of performance uniquely named subscription, and also doesnt work with PowerShell 7, discussed... In hundreds of Azure subscriptions in the one and only vmNic IP azure powershell list all vms in subscription, get! Session will timeout after 20 minutes by default voice entry azure powershell list all vms in subscription https: //feedback.azure.com/users/1609311493 long provide! Using az doesnt sound bad, but they take too long or provide incomplete information is 2.12 scoped the... Might also want to query across thousands of VMs spread out in of. I get `` & & '' or `` -and '' to work around it azure powershell list all vms in subscription! By a space store list of virtual machines under your Azure subscription filter table... You can quickly check using Get-Alias Select-AzSubscription | fl ) that 2 account VMs that might have IP. Context when using Select-AzSubscription -Name < name >, Resource Graph & ''. Of a loop that makes sure that the leftouter join flavor does has its own database, that aggregates from! Will be scoped to the file, but the important question is: why use ARG an! Is added to an existing vmNic while the parent VM is running the parent is... Our user experience is stopped and deallocated an existing vmNic while the parent VM is running?:! This Azure PowerShell article, we will discuss how to delete the Azure in! Found in any of the results columns, including the id for the types seen the! Jobs to complete > > is the append operator in bash ( > writes the... The latters advantage is that 2 ) '' the actual functionalities that are either allowed or not presented...

Zuercher Portal Inmates, University Club Chicago Membership Cost, Odblokovanie Telefonu Telekom, Articles A

azure powershell list all vms in subscription