Creating an Azure Storage Account

  1. Home
  2. Creating an Azure Storage Account

Return to AZ-104 Tutorial

An Azure storage account contains all of your Azure Storage data objects: blobs, files, queues, tables, and disks. The storage account creates a unique namespace for your Azure Storage data, which is accessible through HTTP or HTTPS from anywhere in the globe. Your Azure Storage account’s data is long-lasting and highly accessible, as well as secure and enormously expandable.

Prerequisites to Create Storage Account

  • For Portal – No prerequisites to create storage account
  • And, for PowerShell – To create an Azure storage account with PowerShell, make sure you have installed Azure PowerShell module Az version 0.7 or later. 
  • For Azure CLI – You can sign in to Azure and run Azure CLI commands in one of two ways – You can run CLI commands from within the Azure portal, in Azure Cloud Shell and also You can install the CLI and run CLI commands locally.

Steps to Create Storage Account

An Azure resource group is required for each storage account. A resource group is a logical container for storing and organising Azure services. When you create a storage account, you may choose to create a new resource group or utilise one that already exists. This article will walk you through the process of creating a new resource group.

All Azure Storage services, including blobs, files, queues, tables, and discs, are accessible through a general-purpose v2 storage account. The methods below create a general-purpose v2 storage account, although they are equivalent for any sort of storage account.

Creating Storage Account using Portal

To create a general-purpose v2 storage account in the Azure portal, follow these steps:

  • On the Azure portal menu, select All services. In the list of resources, type Storage Accounts. As you begin typing, the list filters based on your input. Select Storage Accounts.
  • On the Storage Accounts window that appears, choose Add.
  • Select the subscription in which to create the storage account.
  • Under the Resource group field, select Create new. Enter a name for your new resource group, as shown in the following image.
  • Next, enter a name for your storage account. The name you choose must be unique across Azure. The name also must be between 3 and 24 characters in length and can include numbers and lowercase letters only.
  • Select a location for your storage account, or use the default location.
  • Leave these fields set to their default value
  • If you plan to use Azure Data Lake Storage, choose the Advanced tab, and then set Hierarchical namespace to Enabled.
  • Select Review + Create to review your storage account settings and create the account.
  • Select Create.
Practice Test for AZ-104

Creating Storage Account using PowerShell

To begin, use PowerShell to establish a new resource group using the New-AzResourceGroup command. Save the resource group name in a variable so you may reuse it in the future without having to hard-code it.

$resourceGroup = “storage-resource-group”
$location = “westus”
New-AzResourceGroup -Name $resourceGroup -Location $location

Creating Storage Account using Azure CLI

First, create a new resource group with Azure CLI using the az group create command.
az group create \
–name storage-resource-group \
–location westus

If you’re not sure which region to specify for the –location parameter, you can retrieve a list of supported regions for your subscription with the az account list-locations command.

az account list-locations \
–query “[].{Region:name}” \
–out table

Delete a storage account

Deleting a storage account deletes the entire account, including all data in the account, and cannot be undone.

  • For Portal – Navigate to the storage account in the Azure portal and Click Delete.
  • And, for PowerShell – To delete the storage account, use the Remove-AzStorageAccount command – Remove-AzStorageAccount -Name -ResourceGroupName
  • For Azure CLI – To delete the storage account, use the az storage account delete command – az storage account delete –name –resource-group
AZ-104 Online Course

Reference: Microsoft Documentation

Return to AZ-104 Tutorial

Menu