< Back

Set-AzureStorageAccount

Wed Jan 30, 2019 5:54 pm

NAME Set-AzureStorageAccount



SYNOPSIS

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





SYNTAX

Set-AzureStorageAccount [-StorageAccountName] <String> [-Label <String>] [-Description <String>] [-GeoReplicationEnabled <Nullable`1[Boolean]>]

[-Profile <AzureSMProfile>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [<CommonParameters>]



Set-AzureStorageAccount [-StorageAccountName] <String> [-Label <String>] [-Description <String>] [-Profile <AzureSMProfile>] [-InformationAction

<ActionPreference>] [-InformationVariable <String>] [-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.





PARAMETERS

-StorageAccountName <String>

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



Required? true

Position? 0

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Label <String>

Specifies a label for the storage account. The label may be up to 100 characters long.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

Specifies a description for the storage account. The description may be up to 1024 characters long.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-GeoReplicationEnabled <Nullable`1[Boolean]>

Specifies whether the storage account is created with the geo-replication enabled.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Profile <AzureSMProfile>

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationAction <ActionPreference>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-InformationVariable <String>





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Type <String>

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.





Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



NOTES









-------------------------- 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 georeplication 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 georeplication 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.



RELATED LINKS

Get-AzureStorageAccount

New-AzureStorageAccountSASToken

Remove-AzureStorageAccount