---
title: "Storage Accounts"
canonical: "https://www.virtcloudrocks.com/space/azure/557080/Storage%20Accounts"
format: markdown
---
## Create a Storage Account and Blob Container

While being authenticated to Azure, run below Azure CLI commands

```powershell
az storage account create 
	--name sasacal5093d88 
	--resource-group cal-509-3d 
	--location westus 
	--sku Standard_LRS 
	--encryption-services blob 
```


```powershell
az storage container create 
	--name calab 
	--account-name sasacal5093d88 
	--auth-mode login
```

## <span style="color: #222f3f">Enable version tracking on the storage account</span>

```powershell
az storage account blob-service-properties update 
	-n sasacal5093d88 
	--enable-change-feed true 
	--enable-versioning true
```

# View the contents of the 1st file stored in the storage account container

```powershell
key=$(az storage account keys list -g cal-509-3d -n sasacal5093d88 --query [0].value -o tsv)

az storage blob list --container-name calab --account-name sasacal5093d88 --account-key $key
```