New-AzureStorageAccount

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

New-AzureStorageAccount

Creates a new storage account in an Azure subscription.

Syntax

Parameter Set: ParameterSetAffinityGroup
New-AzureStorageAccount [-StorageAccountName] <String> -AffinityGroup <String> [-Description <String> ] [-Label <String> ] [-Type <String> ] [ <CommonParameters>]

Parameter Set: ParameterSetLocation
New-AzureStorageAccount [-StorageAccountName] <String> -Location <String> [-Description <String> ] [-Label <String> ] [-Type <String> ] [ <CommonParameters>]




Detailed Description

This topic describes the cmdlet in the 0.8.10 version of the Microsoft Azure PowerShell module. To get the version of the module you're using, in the Azure PowerShell console, type (Get-Module -Name Azure).Version.

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

-AffinityGroup<String>

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


Aliases

none

Required?

true

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.


Aliases

none

Required?

false

Position?

named

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.


Aliases

none

Required?

false

Position?

named

Default Value

The one used for the Service Name

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Location<String>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

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


Aliases

ServiceName

Required?

true

Position?

1

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

If you do not specify this parameter, the cmdlet uses a default value of Standard_GRS.

Standard_ZRS accounts cannot be changed to other account types, and vice versa.


Aliases

none

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, -OutBuffer, and -OutVariable. For more information, see  about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------- Example 1 --------------

This example creates a new storage account named "azure1" and assigns it to the "prodapps" affinity group.


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

-------------- Example 2 --------------

This example creates a new storage account named "azuretwo" in the "North Central US" data center location.


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

Related topics

Show: