external help file | Module Name | ms.assetid | online version | schema |
---|---|---|---|---|
Microsoft.Azure.PowerShell.Cmdlets.Storage.Management.dll-Help.xml |
Az.Storage |
E53D5040-C1E8-4DC1-8371-F41C00B666E3 |
2.0.0 |
Gets a Storage account.
Get-AzStorageAccount [[-ResourceGroupName] <String>] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzStorageAccount [-ResourceGroupName] <String> [-Name] <String> [-IncludeGeoReplicationStats] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
Get-AzStorageAccount [-ResourceGroupName] <String> [-Name] <String> [-IncludeBlobRestoreStatus] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
The Get-AzStorageAccount cmdlet gets a specified Storage account or all of the Storage accounts in a resource group or the subscription.
Get-AzStorageAccount -ResourceGroupName "RG01" -Name "mystorageaccount"
This command gets the specified Storage account.
Get-AzStorageAccount -ResourceGroupName "RG01"
This command gets all of the Storage accounts in a resource group.
Get-AzStorageAccount
This command gets all of the Storage accounts in the subscription.
$account = Get-AzStorageAccount -ResourceGroupName "myresourcegoup" -Name "mystorageaccount" -IncludeBlobRestoreStatus
$account.BlobRestoreStatus
Status RestoreId FailureReason Parameters.TimeToRestore Parameters.BlobRanges
------ --------- ------------- ------------------------ ---------------------
InProgress a70cd4a1-f223-4c86-959f-cc13eb4795a8 2020-02-10T13:45:04.7155962Z [container1/blob1 -> container2/blob2]
This command gets a Storage accounts with its blob restore status, and show the blob restore status.
Run cmdlet in the background
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The credentials, account, tenant, and subscription used for communication with Azure.
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Get the BlobRestoreStatus of the Storage account.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: BlobRestoreStatusParameterSet
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Get the GeoReplicationStats of the Storage account.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: AccountNameParameterSet
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the name of the Storage account to get.
Type: System.String
Parameter Sets: AccountNameParameterSet, BlobRestoreStatusParameterSet
Aliases: StorageAccountName, AccountName
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the resource group that contains the Storage account to get.
Type: System.String
Parameter Sets: ResourceGroupParameterSet
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: System.String
Parameter Sets: AccountNameParameterSet, BlobRestoreStatusParameterSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.