< Back

New-AzureStorageAccount

Wed Jan 30, 2019 5:49 pm

NAME New-AzureStorageAccount



SYNOPSIS

Creates a new storage account in an Azure subscription.





SYNTAX

New-AzureStorageAccount [-StorageAccountName] <String> [-Label <String>] [-Description <String>] -AffinityGroup <String> [-Type <String>] [-Profile

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



New-AzureStorageAccount [-StorageAccountName] <String> [-Label <String>] [-Description <String>] [-Type <String>] [-Profile <AzureSMProfile>]

[-InformationAction <ActionPreference>] [-InformationVariable <String>] -Location <String> [<CommonParameters>]





DESCRIPTION

The New-AzureStorageAccount cmdlet creates an account that provides access to Azure storage services. A storage account is a globally unique resource

within the storage system. The account is the parent namespace for the Blob, Queue, and Table services.





PARAMETERS

-StorageAccountName <String>

Specifies a name for the storage account. The storage account name must be unique to Azure and must be between 3 and 24 characters in length and use

lowercase letters and numbers only.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Label <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Description <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AffinityGroup <String>

Specifies the name of an existing affinity group in the current subscription. You can specify either the Location or AffinityGroup parameter, but

not both.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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.

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



-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



-Location <String>

Specifies the Azure data center location where the storage account is created. You can include either the Location or AffinityGroup parameter, but

not both.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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: Create a storage account for a specified affinity group --------------------------



PS C:\\>New-AzureStorageAccount -StorageAccountName "azure01" -Label "AzureOne" -AffinityGroup "prodapps"



This command creates a storage account for a specified affinity group.

-------------------------- Example 1: Create a storage account in a specified location --------------------------



PS C:\\>New-AzureStorageAccount -StorageAccountName "azure02" -Label "AzureTwo" -Location "North Central US"



This command creates a storage account in a specified location.



RELATED LINKS

Get-AzureStorageAccount

Set-AzureStorageAccount