before Creating the Storage account i recommend to read these two articles (Microsoft Azure Storage Kind and Architecture & Managing and implementing Azure storage) first to know more information about the choices and options for Storage account. For more information about the all of the previous Posts and Articles related to Microsoft Azure services (Latest Microsoft Azure Articles and Posts)

IF you are interested to read more articles in the same subject here is below :

To create Storage account we should know some information needed for create process

  • Storage account Name: The name should be unique.
  • Resource Group: Storage account services should be created under resource group and it is recommended both to be in the same location for Example “East US”.
  • Location: Location of the Storage account it deepened on it the features of the storage account because not all features supported on all locations.
  • Account Kind: We have 5 Types (V1, V2, BlobStorage, BlockBlobStorage, FileStorge)
  • Storage Replication: Microsoft provide 6 types of replications depended on the locations and the storage account kind (LRS, ZRS, GRS, RA-GRS, GZRS, RA-GZRS)

Create Storage account using PowerShell Command

  • Create Resource Group
  • Show list by all resource groups
  • Create Storage account
  • Show list by all Storage account
  • Remove Storage account
  • Remove Resource Group
New-AzResourceGroup -Name storageresourcegroup -location "East US 2"
Get-AzResourceGroup
New-AzStorageAccount -name elmasryteststorage1 -ResourceGroupName storageresourcegroup -SkuName Standard_LRS -location "East US 2" -kind Storagev2
Get-AzStorageAccount
Remove-AzStorageAccount -name elmasryteststorage1 -ResourceGroupName storageresourcegroup
Remove-AzResourceGroup -name storageresourcegroup

Create Storage account using CLI Command

  • Create Resource Group
  • Show list by all resource groups
  • Create Storage account
  • Show list by all Storage account
  • Remove Storage account
  • Remove Resource Group
az group create --name storageresourcegroup2 --location "East US 2"
az group list
az storage account create --name elmasryteststorage2 --resource-group storageresourcegroup2 --location "East US 2" --kind storagev2 --sku standard_LRS
az storage account list
az storage account delete -n elmasryteststorage2 -g storageresourcegroup2
az group delete -n storageresourcegroup2

Removing resource group meaning remove all of azure services under this resource group “Take Care”

Keep Following Me

5 thoughts on “Create Storage Account Using PowerShell and CLI Command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.