Hello, @Fábio Santos !
How do I see how many VMs have been used for Azure Hybrid Benefit?
The number of licenses available are the number of core licenses that you own that are covered with active Software Assurance or Windows Server Subscriptions. You can use the Azure Hybrid Benefit Savings Calculator and check out the Azure Hybrid Benefit for Windows Server Documentation for more detail on how this works.
To check how many are in use, the recommended approach is to use either Azure CLI or PowerShell to count all virtual machines and virtual machine scale sets deployed with Azure Hybrid Benefit for Windows Server:
Check VMs in use with Azure CLI:
az vm list --query "[?licenseType=='Windows_Server']" -o table
Check VMs in use with PowerShell:
Get-AzVM | ?{$_.LicenseType -like "Windows_Server"} | select ResourceGroupName, Name, LicenseType
You can also check your Microsoft Azure bill to determine how many VMs with Azure Hybrid Benefit for Windows Server you're running. You can find information about the number of instances with the benefit under Additional Info:
"{"ImageType":"WindowsServerBYOL","ServiceType":"Standard_A1","VMName":"","UsageType":"ComputeHR"}"
For additional information, check out the documentation:
- Azure Hybrid Benefit for Windows Server: How to maintain compliance
- List all VMs and virtual machine scale sets with Azure Hybrid Benefit for Windows Server in a subscription
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!