Set-​Azure​Storage​Account

Updates the properties of a storage account in an Azure subscription.

Syntax

Set-AzureStorageAccount
   [-StorageAccountName] <String>
   [-Description <String>]
   [-GeoReplicationEnabled <Boolean>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Label <String>]
   [-Profile <AzureSMProfile>]
   [<CommonParameters>]
Set-AzureStorageAccount
   [-StorageAccountName] <String>
   [-Description <String>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Label <String>]
   [-Profile <AzureSMProfile>]
   [-Type <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.

Required Parameters

-StorageAccountName

Specifies the name of the storage account that this cmdlet modifies.

Type:String
Aliases:ServiceName
Position:0
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional 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
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
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
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
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
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
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
Accept pipeline input:False
Accept wildcard characters:False