Create Azure Storage Shared Access Signature and manage files with PowerShell

In one of the previous posts, we discussed how to create and manage Azure Storage accounts using PowerShell. However, we were using storage account key when trying to upload / delete / download files from azure blob storage. In case, you need to delegate access to a third person, this seems like a too much of access since that person will have access to whole storage account. In this post, we will discuss how to use SAS aka Shared Access Signature to delegate access in controlled way.

Concept of Shared Access Signature

A shared access signature is a way to delegate access to resources in a storage account, without sharing the storage account keys. Continue reading “Create Azure Storage Shared Access Signature and manage files with PowerShell”

Provision Azure Storage Account and automate file upload and deletion using PowerShell

Microsoft Azure Storage is a cloud offering from Microsoft that provides highly scalable, available, durable storage. Its a part of Microsoft Azure offerings. Azure Storage consists of three data services: Blob storage, File storage, and Queue storage. Blob storage supports both standard and premium storage, with premium storage using only SSDs for the fastest performance possible.

Now as is often the case with the cloud services, it comes at a cost. So you should be very careful in using only the space you need and not paying for extra storage consumption that you should not need to. Along with that, you should be able to automate it. In this blog post, we’ll learn how to create an Azure Storage account, uploads some files to it in the blob storage and then delete them all using PowerShell.  Continue reading “Provision Azure Storage Account and automate file upload and deletion using PowerShell”

Delete an storage account containing an leased blob

Yesterday, I provisioned a couple of Azure VMs and provisioned them in a new storage account. In the end, I deleted the virtual machines and associated images and then tried to delete the newly created storage account. However the request to delete the storage account failed.

On the classic portal, https://manage.windowsazure.com, nothing happened when clicking delete button. On the new resource manager portal, https://portal.azure.com, when I delete the storage account, I got this error:

Failed to delete storage account 'ddportalvhdss3zc5vtxqstw'. Unable to delete 
storage account 'ddportalvhdss3zc5vtxqstw': 'Storage account 
ddportalvhdss3zc5vtxqstw contains VM Images. 
Ensure these VM Images are removed before deleting this storage account.'.

Trying to delete the blob itself …Continue Reading