Get-AzureStorageAccount

Gets the storage accounts for the current Azure subscription.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Get-AzureStorageAccount
   [[-StorageAccountName] <String>]
   [-Profile <AzureSMProfile>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The Get-AzureStorageAccount cmdlet returns an object containing information about the storage accounts for the current subscription. If the StorageAccountName parameter is specified, then only information about the specified storage account is returned.

Examples

Example 1: Return all storage accounts

PS C:\> Get-AzureStorageAccount

This command returns an object with all the storage accounts associated with the current subscription.

Example 2: Return account information for a specified account

PS C:\> Get-AzureStorageAccount -StorageAccountName "ContosoStore01"

This command returns an object with only the ContosoStore01 account information.

Example 3: Display a table of storage accounts

PS C:\> Get-AzureStorageAccount | Format-Table -AutoSize -Property @{Label="Name";Expression={$_.StorageAccountName}},"Label","Location"

This command returns an object with all the storage accounts associated with the current subscription, and outputs them as a table showing the account name, the account label, and the storage location.

Parameters

-InformationAction

Specifies how this cmdlet responds to an information event.

The acceptable values for this parameter are:

  • Continue
  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InformationVariable

Specifies an information variable.

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

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

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

-StorageAccountName

Specifies the name of a storage account. If specified, this cmdlet returns only the specified storage account object.

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

Outputs

ManagementOperationContext

Notes

  • Type help node-dev to get help on Node.js development-related cmdlets. Type help php-dev to get help on PHP development-related cmdlets.