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>]
   [-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" -Type "Standard_GRS"

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

Example 2: Create a bBlob Storage account that uses Storage Service encryptionB

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 Enable Storage Service encryption on Blob and File Services

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

This command creates a Storage account that enabled Storage Service encryption on Blob and File Services.

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