Create an Azure Storage account using PowerShell

1
101
views

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 

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!

Previous articleHow to encrypt an Azure Virtual Machine
Next articleHow to request your Office 365 Data to be moved to South African Data Centers
About Me ? I Guess i would start by saying i am a family guys and full time SysAdmin and Tech Junky. This Blog is my first attempt to share information about daily issues i come across as a SysAdmin as well as some new deployments i am part of. Topics that i will cover will mostly be about Office 365,Windows,Exchange as well as Active Directory. I hope some of my Blog posts helps someone #LiveLongAndBeLazy #Exchange #Office 365 #ActiveDirectory #Hyper-V
SHARE

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here