Secondly, a page size of 5000 is not possible for our queries in their current state (listing 20 for ARM and listing 21 for ASM). And since Azure has, at this time, resources deployed using two possible models (ASM and ARM), you need to be careful about what you use to get each set of VMs, as the tools used to retrieve the info for one are incompatible with the other. I just wish Microsoft would provide more advanced ARG query examples and varying kinds. Can the Spiritual Weapon spell be used as cover? At the time of this writing Sep 2020 the referenced article doesnt explicitly tell about this known limitation. For our final Powershell code, this means were going to have an additional layer of pagination, at the level of subscription batches. 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. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. You can also use the below Azure PowerShell cmdlet to retrieve the instance properties of a specific Azure Virtual Machine under a particular resource group. Were simply indexing in the one and only vmNic IP configuration, then get to the right slot that contains the info were after. Well end up not with just one loop, but with 2. But theres a problem, as Get-AzVM will only operate against machines deployed using the ARM model, as explicitly stated here: However, the Resource Manager cmdlet Get-AzVM only returns virtual machines deployed through Resource Manager. "OSVersion" = $Vm.StorageProfile.ImageReference.Sku 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. There was an article herewritten about a year ago, stating that dynamic IP addresses couldnt be retrieved using ARG. Q: Back in figure 2, are sku and plan dynamic types or primitive types (eg string)?A: Theyre dynamic types. Heres our loop below, which adds each subsequent Search-AzGraph output to an array that will eventually contain the final result set. We know the rows for the left table are unique as we dont expect for a VM id to show up twice. 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. Get all VMs grouped by Subscription with Azure Resource Graph This is a quick one. This window will be obtained by using the Search-AzGraphs -First and -Skip parameters. As for the types seen in the Schema explorer, what you see is not the full story. The problem with this command is that its running synchronously, thus retrieving results per one subscription at a time only. Which describes quite well that the leftouter join flavor does. try document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); This site uses Akismet to reduce spam. This single vmNic has just one IP Configuration, consisting of a private IP and a public IP. Well add one more row to our query, so it becomes: This is what we were after however lets not forget that weve been working against a VMs single vmNic all along. It would appear further that things are simple, with horizontal-lines-icon indicating primitive types, while the grid-icon represents a dynamic type. Microsoft already provides some code to extract all the VM data including their private and public IPs per one subscription, here. +1. Heres the partial output when supplying the ARM query in listing 23: 4 attributes appear to control how many requests can be made. The columns and their values are identical for the 2 rows except for one extra column that was added, called ipconfig. $VMStatusDetail = $VMDetail.Statuses.DisplayStatus -match "^VM . Even if you keep yourself active in that session, Cloud Shell still issues tokens valid for 1h, so the cmdlets running will start erroring out after that time, with the dreaded The access token expiry UTC time