If you automate New-AzureStorageAccount in a PowerShell script you ensure you only lowercase letters and digits for the value of the -StorageAccountName parameter. If you base that value on other parameters or variables (for example the name of one of your websites) and you have uppercase letters or dashes in those parameters or variables, you will see an error like this:
$storageAccountName = "Radu-Grama-Name"
New-AzureStorageAccount -StorageAccountName $storageAccountName -Location "East US"
VERBOSE: 10:29:20 AM - Begin Operation: New-AzureStorageAccount
New-AzureStorageAccount : Specified argument was out of the range of valid values.
Parameter name: parameters.Name
At line:1 char:1
+ New-AzureStorageAccount -StorageAccountName $storageAccountName -Location "East ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzureStorageAccount], ArgumentOutOfRangeEx
ception
+ FullyQualifiedErrorId : System.ArgumentOutOfRangeException,Microsoft.WindowsAzure.Command
s.ServiceManagement.StorageServices.NewAzureStorageAccountCommand

You need to “sanitize” the value of the -StorageAccountName parameter, and the easiest way to do it is to remove all non-lowercase letters and non-digits like this:
$storageAccountName = [Regex]::Replace($storageAccountName.ToLower(), '[^(a-z0-9)]', '')

Then you can run New-AzureStorageAccount as intended.

Bitnami