Jaa


Know your Azure Subscription Quota and Usage

There are two ways by which you can face the Azure Subscription limit,

  1. Wait till you script fails provision the resources
  2. Check regularly on important services and their limit.

Obviously the second option is the desired one and PowerShell do give few easy to run commandlets

Few things you need,

  1. Login to Azure using PowerShell

  2. Then check which subscription it is pointing to. If you are part of multiple subscription then you need to point to the right one.

  3. To know the subscription you are part of run

    This would give you the list of subscriptions and pickup the right GUID

  4. Then run the following command with the GUID

Check the VM Usage

Check the Network Usage

Check the Storage Account Quota

There are couple of them as well. To get them all

In fact, you keep checking. In my machine between PowerShell modules Network has been added. So, expect more to come.

Now these are all in separate commands. Let's combine them together and generate an output in Excel (CSV)

Link to Git file https://github.com/wrijughosh/PowerShellWG/blob/master/AzureLimits.ps1