Skip to content

Create an Azure Storage account using PowerShell

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.


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

Next we can run the following to verify if the new account has been created.

Get-AzStorageAccount -StorageAccountName lazylabstg -ResourceGroupName RSG-MSFT-STG01 

That’s how you can quickly create a new resource group and storage account.

Sharing is caring!

Published inAzureAzure Storage

One Comment

Leave a Reply

Your email address will not be published.