Okay, yeah there are plenty of scripts out which give you local accounts via WMI or ADSI and yes scripts exist also which give you all local groups but there is not one which gives you both (of course there are also some) but what...
If you need a script which outputs you the overall VMCore amount per region, there you go.
This is a snippet from a RunBook which iterates also through each subscription before, so you would get all amount of used cores per subscription as well as per region.
To get your Tenant ID, you can use PowerShell or the Azure Portal.
You have two options with PowerShell, first option is using
which directly gives you your Subscription ID as well as your default Tenant ID.
Second option is using Add-AzureAccount and Get-AzureAccount
This has the...