Created
January 5, 2023 12:10
-
-
Save andrewmatveychuk/019106dd6c6a1f5232dd8b2c939750eb to your computer and use it in GitHub Desktop.
Get the list of Windows Server Azure VMs with Azure Hybrid Benefit enabled and group them by VM size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources | |
| where type =~ 'microsoft.compute/virtualmachines' | |
and tostring(properties.storageProfile.imageReference.publisher) =~ 'MicrosoftWindowsServer' | |
and tostring(properties.['licenseType']) == 'Windows_Server' | |
| summarize Count=count(type) by VMSize = tostring(properties.hardwareProfile.vmSize) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment