New-AzureStorageAccount
Syntax
New-AzureStorageAccount
[-StorageAccountName] <String>
-AffinityGroup <String>
[-Description <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Label <String>]
[-Profile <AzureSMProfile>]
[-Type <String>]
[<CommonParameters>]
New-AzureStorageAccount
[-StorageAccountName] <String>
[-Description <String>]
[-InformationAction <ActionPreference>]
[-InformationVariable <String>]
[-Label <String>]
-Location <String>
[-Profile <AzureSMProfile>]
[-Type <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.
Examples
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 2: 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.
Required Parameters
Specifies the name of an existing affinity group in the current subscription. You can specify either the Location or AffinityGroup parameter, but not both.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Specifies the Azure data center location where the storage account is created. You can include either the Location or AffinityGroup parameter, but not both.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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.
| Type: | String |
| Aliases: | ServiceName |
| Position: | 0 |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
Optional Parameters
Specifies a description for the storage account. The description may be up to 1024 characters in length.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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 |
Specifies an information variable.
| Type: | String |
| Aliases: | iv |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Specifies a label for the storage account. The label may be up to 100 characters in length.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True (ByPropertyName) |
| Accept wildcard characters: | False |
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 |
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.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |