Create Azure Storage Account – New-AzureStorageAccount : StorageAccountAlreadyTaken

I was trying to create an Azure Storage Account using PowerShell cmdlets over the weekend and was welcomed by bunch of errors.

Error Message:

PS C:\> New-AzureStorageAccount -ResourceGroupName “TestAvaGRP” -Name “teststorage” -Type “Standard_LRS” -Location “East
New-AzureStorageAccount : StorageAccountAlreadyTaken: The storage account named teststorage is already taken.
At line:1 char:1
+ New-AzureStorageAccount -ResourceGroupName “TestAvaGRP” -Name “teststorage” -Typ …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [New-AzureStorageAccount], CloudException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Management.Storage.NewAzureStorageAccountCommand

I quickly checked the Syntax of New-AzureStorageAccount from the following MSDN link and it says “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.”

In simple language, this means, if some one else who is not related to your subscription has created the storage account with same name – the command will fail to create the storage account. Your storage account name should be unique because New-AzureStorageAccount runs in global context and not under your subscription. Hopefully Microsoft will get around this as it might cause naming standards issue when creating accounts (if someone else has created the similar storage account else where with same name).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s