Determining Core Counts in Azure PowerShell the Easy Way™

In the past, to retrieve the number of cores in use in a given Azure subscription (or to retrieve the maximum number of cores available), we had to jump through some hoops to get the information we needed.

One method was to loop through ALL of the Services and then ALL of the Virtual Machines provisioned and maintain a running count of the consumed cores (Ex. Windows Azure compute cores and you. Not only is this tedious, it’s no longer necessary!

A new parameter has been introduced to the Get-AzureSubscription cmdlet called ExtendedDetails. By executing the cmdlet with the ExtendedDetails parameter, you’ll see not only the CurrentCoreCount and MaximumCoreCount, but also some metrics around the number of services you’re consuming (Cloud Services, Storage Accounts, etc.).

Get-AzureSubscription -ExtendedDetails output

If you’ve been executing scripts to provision environments that consistently fail due to lack of cores, a quick check of the output of the Get-AzureSubscription cmdlet could save you some time.

(Source: msdn.microsoft.com)