In our previous post, we have seen the ARM Template deployment for creating a storage account in Microsoft Azure. This post is a continuation of the same and now we will learn how to deploy a storage account using PowerShell.
A few things to note:
- Ensure that Azure RM libraries and Azure Classic (optional) libraries are installed in your machine. If not, use the following commands to install and import the Azure RM libraries in PowerShell:
- Install-Module -Name AzureRm
- Import-Module AzureRm.
- For using Azure Classic commands, it is mandatory that you have service administrator/ Owner level access in the Azure Subscription.
- In this post we will also learn how to create a container, upload and download a blob file to the Azure Storage.
Now let’s get started with the PowerShell script to create a storage account, upload and download a blob file from the same.
- Open PowerShell ISE and click on the new file button in the menu bar.
- A scripting pane will appear where we will write our code.