Set-AzureStorageAccount
Updates the properties of a storage account in an 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
AccountType (Default)
Set-AzureStorageAccount
[-StorageAccountName] <String>
[-Label <String>]
[-Description <String>]
[-Type <String>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
GeoReplicationEnabled
Set-AzureStorageAccount
[-StorageAccountName] <String>
[-Label <String>]
[-Description <String>]
[-GeoReplicationEnabled <Boolean>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
Description
The Set-AzureStorageAccount cmdlet updates the properties of an Azure storage account in the current subscription. Properties that can be set are: Label, Description, Type and GeoReplicationEnabled.
Examples
Example 1: Update the label for a storage account
PS C:\> Set-AzureStorageAccount -StorageAccountName "ContosoStorage01" -Label "ContosoAccnt" -Description "Contoso storage account"
This command updates the Label and Description properties for the storage account named ContosoStorage01.
Example 2: Enable geo-replication for a storage account
PS C:\> Set-AzureStorageAccount -StorageAccountName "ContosoStorage01" -GeoReplicationEnabled $False
This command sets the GeoReplicationEnabled property to $False for the storage account named ContosoStorage01.
Example 3: Disable geo-replication for a storage account
PS C:\> Set-AzureStorageAccount -StorageAccountName "ContosoStorage01" -GeoReplicationEnabled $True
This command sets the GeoReplicationEnabled property to $True for the storage account named ContosoStorage01.
Parameters
-Description
Specifies a description for the storage account. The description may be up to 1024 characters long.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-GeoReplicationEnabled
Specifies whether the storage account is created with the geo-replication enabled.
Parameter properties
Type: | Boolean |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
GeoReplicationEnabled
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InformationAction
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Parameter properties
Type: | ActionPreference |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | infa |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InformationVariable
Specifies an information variable.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | iv |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Label
Specifies a label for the storage account. The label may be up to 100 characters long.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | 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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-StorageAccountName
Specifies the name of the storage account that this cmdlet modifies.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ServiceName |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Type
Specifies the type of the storage account. Valid values are:
- Standard_LRS
- Standard_ZRS
- Standard_GRS
- Standard_RAGRS
- Premium_LRS
If this parameter is not specified, the default value is Standard_GRS.
The effect of specifying the GeoReplicationEnabled parameter is the same as specifying Standard_GRS in the Type parameter.
Standard_ZRS or Premium_LRS accounts cannot be changed to other account types, and vice versa.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
AccountType
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.