This Azure article will discuss how to create Azure storage accounts using Azure Portal, PowerShell, and Azure CLI.
Table of Contents
How to create a storage account in Azure Portal
Follow the below steps to create the storage account
1. Log in to the Azure portal (https://portal.azure.com/)
2. Search for the Storage accounts (classic) and select it.
3. Click the + Add button from the Storage accounts (classic) window.
4. On the Create storage account window, Provide the below details in the Basics tab.
- Subscription: Select your subscription details.
- Resource group: Select your existing resource group or create a new one by clicking on the Create new link.
- Storage account name: Provide a valid name for your storage account.
- Location: Select the location you belong to.
- Performance: Select the Standard option.
- Account kind: You can use the default option or choose the appropriate one.
- Replication: You can use the default option or choose the appropriate one.
- Access tier(default): Select the default Hot or Cool options.
Click the Next: Networking > button to go to the Networking tab.
On the networking tab, keep the default option as it is. Click on the Next: Tags > button to go to the Tags tab
On the Tags tab no need to change anything. Click on the Next: Review + Create> button.
Click on the Create button to create the storage account.
Now you can see it is deployed successfully
How to create a storage account in Azure using PowerShell
You can use the below PowerShell cmdlet to create a storage account using PowerShell.
$resourceGroup = 'newresgroup'
$location = 'East US'
New-AzStorageAccount -ResourceGroupName $resourceGroup `
-Name mynewstroageaccount890 `
-Location $location `
-SkuName Standard_RAGRS `
The name should be a unique name with all lowercase letters.
After executing the PowerShell script, the storage account was created successfully. See the below screenshot.
The SkuName parameter can be anything from below based on your business needs
Locally redundant storage as Standard_LRS, Zone-redundant storage (ZRS) as the Standard_ZRS, Geo-redundant storage (GRS) as the Standard_GRS, Read-access geo-redundant storage (GRS) as the Standard_RAGRS, etc
Now you can log in to the Azure portal and verify if the storage account was created
How to create a storage account using Azure CLI
Let’s discuss how to create a storage account using Azure CLI here. Before that, we should know the Prerequisites to create the storage account using Azure CLI.
- The first and most important thing is having an Azure Subscription or Azure account. If you don’t have an Azure Account, Create an Azure free account now.
- You must have installed the Azure CLI on your machine. If you have not yet installed the Azure CLI on your machine, then install the Azure CLI on your machine now.
To ensure you have successfully installed the Azure CLI on your machine, you can open the command prompt and then run the command az. You can see below that “Welcome to Azure CLI!”.
Now, assuming you are ready with all the prerequisites needed here, let’s start the actual functionality i.e., creating a storage account Azure CLI.
As a next step, you need to use the Az login command to log in to the Azure account using the Azure CLI.
Now, it will prompt you to enter your Azure credentials to log in to the Azure account.
You can see the screen below once you have logged in to your Azure account.
You can set a specific subscription using the below command if you have multiple subscriptions.
az account set –subscription “YourSubscriptionName”
In order to create a storage account, the first step is to create a Resource Group. Let’s create a resource group.
Create a Resource Group using Azure CLI
You can execute the below cmdlet to create the Resource Group using the Azure CLI
az group create --location eastus --name mynewresgrp1
Once you have executed the above command, you will get the output as below.
Now, you can see the Resource group has been created successfully.
Now our Resource Group is ready, the next step is to Create Storage Account using Azure CLI.
Create a Storage Account using Azure CLI
You must execute the command below to create a storage account using the Azure CLI.
az storage account create --name demostoragesql9 --resource-group mynewresgrp1 --location eastus --sku Standard_LRS
Once we have executed the above command, you can see the below output.
Logged in to Azure Portal and verified that the storage account has been created successfully. Check out the below screenshot.
This is how you can Create Storage Account using Azure CLI.
Is Azure storage account IaaS or PaaS
Azure storage contains multiple services. From those, a few belong to IaaS and a few belong PaaS.
You can also like following the articles below
- Azure Storage Account Connection String
- What is Azure Storage Account Key
- How To Delete Azure Storage Account Using PowerShell
This article discussed Azure storage accounts, Azure storage account types, and how to create Azure storage accounts using Azure Portal and PowerShell. Thanks for reading this article !!!
I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.