Create an Azure Storage account using PowerShell
In this short post, I will show you how you can create a new Azure Storage Account using PowerShell.
To get started, you will have to establish a connection to your Azure account by running the following.
Connect-AzAccount
![](http://www.thatlazyadmin.com/wp-content/uploads/2019/08/word-image-25.png)
Before we continue, you will need to know the following information.
- Location = Azure Resource Location
- Sku Name
In the following example, we will create a new Resource Group as well as the new Storage Account.
$location = "southafricanorth"
$resourceGroup = "RSG-MSFT-STG01"
$storageAccountName = "lazylabstg"
$skuName = "Standard_LRS"
#Create new ResourceGroup
$resourceGroup = "RSG-MSFT-STG01"
New-AzResourceGroup -Name $resourceGroup -Location $location
# Create the storage account.
$storageAccount = New-AzStorageAccount -ResourceGroupName $resourceGroup `
-Name $storageAccountName `
-Location $location `
-SkuName $skuName
New Resource Group and Storage account has been created
![](http://www.thatlazyadmin.com/wp-content/uploads/2019/08/word-image-26.png)
Next we can run the following to verify if the new account has been created.
Get-AzStorageAccount -StorageAccountName lazylabstg -ResourceGroupName RSG-MSFT-STG01
![](http://www.thatlazyadmin.com/wp-content/uploads/2019/08/word-image-27.png)
That’s how you can quickly create a new resource group and storage account.
![](http://www.thatlazyadmin.com/wp-content/uploads/2018/06/word-image-14.png)
[…] Create an Azure Storage account using PowerShell […]