Set-​Azure​Rm​Storage​Account

Modifies a Storage account.

Syntax

Set-AzureRmStorageAccount
   [-ResourceGroupName] <String>
   [-Name] <String>
   [[-SkuName] <String>]
   [[-AccessTier] <String>]
   [[-CustomDomainName] <String>]
   [[-UseSubDomain] <Boolean>]
   [[-EnableEncryptionService] <EncryptionSupportServiceEnum>]
   [[-DisableEncryptionService] <EncryptionSupportServiceEnum>]
   [[-Tag] <Hashtable>]
   [-Force]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmStorageAccount cmdlet modifies an Azure Storage account. You can use this cmdlet to modify the account type, update a customer domain, or set tags on a Storage account.

Examples

Example 1: Set the Storage account type

PS C:\>Set-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -Type "Standard_RAGRS"

This command sets the Storage account type to Standard_RAGRS.

Example 2: Set a custom domain for a Storage account

PS C:\>Set-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -CustomDomainName "www.contoso.com" -UseSubDomain $True

This command sets a custom domain for a Storage account.

Example 3: Enable encryption on Blob and File Services

PS C:\>Set-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -EnableEncryptionService "Blob,File"

This command enables Storage Service encryption on Blob and File for a Storage account.

Example 4: Set the access tier value

PS C:\>Set-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -AccessTier Cool

The command sets the Access Tier value to be cool.

Required Parameters

-Name

Specifies the name of the Storage account to create.

Type:String
Aliases:StorageAccountName, AccountName
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group in which to modify the Storage account.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AccessTier

Specifies the access tier of the Storage account that this cmdlet modifies. The acceptable values for this parameter are: Hot and Cool.If you change the access tier, it may result in additional charges. For more information, see Azure Blob Storage: Hot and cool storage tiershttp://go.microsoft.com/fwlink/?LinkId=786482 (http://go.microsoft.com/fwlink/?LinkId=786482). If the kind of Storage account is Storage, do not specify this parameter.

Type:String
Position:3
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-CustomDomainName

Specifies the name of the custom domain.

Type:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableEncryptionService

Indicates whether this cmdlet disables Storage Service encryption on the Storage Service. Azure Blob and Azure File Services are supported.

Type:EncryptionSupportServiceEnum
Position:7
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableEncryptionService

Indicates whether this cmdlet enables Storage Service encryption on the Storage Service. Azure Blob and Azure File Services are supported.

Type:EncryptionSupportServiceEnum
Position:6
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

If you change the access tier, it may result in additional charges. For more information, see Azure Blob Storage: Hot and cool storage tiershttp://go.microsoft.com/fwlink/?LinkId=786482 (http://go.microsoft.com/fwlink/?LinkId=786482). If the kind of Storage account is Storage, do not specify this parameter.

Type:SwitchParameter
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
-SkuName

Specifies the SKU name of the storage account. The acceptable values for this parameter are:- Standard_LRS. Locally-redundant storage.

  • Standard_ZRS. Zone-redundant storage.
  • Standard_GRS. Geo-redundant storage.
  • Standard_RAGRS. Read access geo-redundant storage.
  • Premium_LRS. Premium locally-redundant storage.You cannot change Standard_ZRS and Premium_LRS types to other account types. You cannot change other account types to Standard_ZRS or Premium_LRS.
Type:String
Aliases:StorageAccountType, AccountType, Type
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

If you specify a value of BlobStorage for the Kind parameter of the New-AzureRmStorageAccount cmdlet, you must specify a value for the AccessTier parameter.If you specify a value of Storage for this Kind parameter, do not specify the AccessTier parameter.

Type:Hashtable
Aliases:Tags
Position:8
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UseSubDomain

Indicates whether to enable indirect CName validation.

Type:Boolean
Position:5
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False