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
Set-AzureStorageAccount
[-StorageAccountName] <String>
[-Label <String>]
[-Description <String>]
[-Type <String>]
[-Profile <AzureSMProfile>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[<CommonParameters>]
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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GeoReplicationEnabled
Specifies whether the storage account is created with the geo-replication enabled.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
-Label
Specifies a label for the storage account. The label may be up to 100 characters long.
Type: | String |
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 the storage account that this cmdlet modifies.
Type: | String |
Aliases: | ServiceName |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |