Get-AzureRmStorageUsage

Gets the Storage resource usage of the current subscription.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Get-AzureRmStorageUsage
   [-Location <String>]
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmStorageUsage cmdlet gets the resource usage for Azure Storage for the current subscription.

Examples

Example 1: Get the storage resources usage

PS C:\>Get-AzureRmStorageUsage

This command gets the Storage resources usage of the current subscription.

Example 2: Get the storage resources usage of specified location

PS C:\>Get-AzureRmStorageUsage -Location 'West US'

LocalizedName : Storage Accounts
Name          : StorageAccounts
Unit          : Count
CurrentValue  : 18
Limit         : 250

This command gets the Storage resources usage of the specified location under the current subscription.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Location

Indicate to get Storage resources usage on the specified location. If not specified, will get Storage resources usage on all locations under the subscription.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

None

Outputs

PSUsage