Virtualization, Cloud, Infrastructure and all that stuff in-between
My ramblings on the stuff that holds it all together
POSH1Liner – Count the number of resource groups in a subscription
Posted by on April 23, 2025
If you ever need a quick count of the number of resource groups in your current subscription (get-azContext) to check you can use the following command to get a quick check.
(get-AzResourceGroup).count
This is especially useful if you’re using a shared subscription that may be pushing the 980 resource group limit and you want to check before a script runs.
