Skip to content

Powershell script to count the licenses required to cover your Azure VMs running with the AHUB flag.

Notifications You must be signed in to change notification settings

JayWitt/countAHUB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

countAHUB

This script uses Azure Resource Graph to query the Azure subscription you specify or all of the subscriptions that you have access to with the intent of counting the number of cores and VMs to caluclate the number of licenses needed to cover those VMs that have AHUB enabled.

Usage Information

There are a few things to keep in mind when running this script:

  1. In order to run this script you will need to install the Resource Graph modules from the Powershell Gallery by using the following command: Install-Module -Name AzureRm.ResourceGraph -AllowPrerelease
  2. You have to be logged in to Azure via PowerShell before using this script. This is also using some of the older commands, so you may also need to issue the Enable-AzureRmAlias command
  3. Update the $SubscriptionID variable line with the subscription ID that you want to search or clear it out to search all of the subscriptions that you have access.
  4. Additional information on how to calculate Azure Hybrid Use Benefits can be found here.

Disclaimer

Please note that this is an example and is meant to help collect the relavent information needed to determine how many licenses you would need. This is not meant to be any official reporting mechanism.

About

Powershell script to count the licenses required to cover your Azure VMs running with the AHUB flag.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published