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...
In case you get this error below, this error is mostly due to outdated Modules or at least in this case the AzureRM module.
Your Azure credentials have not been set up or have expired, please run Login-AzureRMAccount to set up your Azure credentials.
Easily go ahead...
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...