Get-AzureStorageAccount
Syntax
Get-AzureStorageAccount
[[-StorageAccountName] <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Profile <AzureSMProfile>]
[<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.
Optional Parameters
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies an information variable.
| Type: | String |
| Aliases: | iv |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
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 |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Outputs
ManagementOperationContext
Notes
- Type
help node-devto get help on Node.js development-related cmdlets. Typehelp php-devto get help on PHP development-related cmdlets.