New-​Azure​Rm​Storage​Account

Creates a Storage account.

Syntax

New-AzureRmStorageAccount
   [-ResourceGroupName] <String>
   [-Name] <String>
   [-SkuName] <String>
   [[-Kind] <String>]
   [[-AccessTier] <String>]
   [-Location] <String>
   [[-CustomDomainName] <String>]
   [[-UseSubDomain] <Boolean>]
   [[-EnableEncryptionService] <EncryptionSupportServiceEnum>]
   [[-Tag] <Hashtable>]
   [-AssignIdentity]
   [-EnableHttpsTrafficOnly <Boolean>]
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [<CommonParameters>]

Description

The New-AzureRmStorageAccount cmdlet creates an Azure Storage account.

Examples

Example 1: Create a Storage Account

PS C:\>New-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -Location "US West" -SkuName "Standard_GRS"

This command creates a Storage account for the resource group name MyResourceGroup.

Example 2: Create a Blob Storage account that uses Storage Service Encryption

PS C:\>New-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -Location "US West" -SkuName "Standard_GRS" -EnableEncryptionService Blob -Kind "BlobStorage" -AccessTier Hot

This command creates a Blob Storage account that uses the hot access type. The account has enabled Storage Service encryption on Blob Service.

Example 3: Create a Storage Account that Enables Storage Service Encryption on Blob and File Services, and Generate and Assign an Identity for Azure KeyVault.

PS C:\>New-AzureRmStorageAccount -ResourceGroupName "MyResourceGroup" -AccountName "MyStorageAccount" -Location "US West" -SkuName "Standard_GRS" -EnableEncryptionService "Blob,File" -AssignIdentity

This command creates a Storage account that enabled Storage Service encryption on Blob and File Services. It also generates and assigns an identity that can be used to manage account keys through Azure KeyVault.

Required Parameters

-Location

Specifies the location of the Storage account to create.

Type:String
Position:5
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-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 add the Storage account.

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

Specifies the SKU name of the storage account that this cmdlet creates. 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.
Type:String
Aliases:StorageAccountType, AccountType, Type
Position:2
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 creates. The acceptable values for this parameter are: Hot and Cool.

If you specify a value of BlobStorage for the Kind parameter, 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:String
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AssignIdentity

Generate and assign a new Storage Account Identity for this storage account for use with key management services like Azure KeyVault.

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

Specifies the name of the custom domain of the Storage account. The default value is Storage.

Type:String
Position:6
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:8
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-EnableHttpsTrafficOnly

Indicates whether or not the Storage Account only enable https traffic.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
-Kind

Specifies the kind of Storage account that this cmdlet creates. The acceptable values for this parameter are:

  • Storage. General purpose storage account that supports storage of Blobs, Tables, Queues, Files and Disks.

  • BlobStorage. Blob storage account which supports storage of Blobs only.

The default value is Storage.

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

If you specify a value of BlobStorage for the Kind parameter, 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:9
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UseSubDomain

Indicates whether to enable indirect CName validation.

Type:Boolean
Position:7
Default value:None
Accept pipeline input:False
Accept wildcard characters:False