Total Page Preview:   000000003665

How to Create Azure Blob Storage using Powershell Command in Microsoft Azure

In this article I am going to explain How to Craete  Azure Blob Storage Using Power-shell Command in Microsoft Azure

Create Azure blob storage using powershell command with ARM Scripts:

#-------- TenantId -------------#

Get TenantId from the Azure Portal: 
Get TenantId In Azure
$tenantid = 'd29b7a9b-6edb-tgrrrf-gggg-3c5c6c3eeeb0'
#----------Your UserId and Password--------------------#
$username =  ''
$password = 'xxxxxxxxxxx' | ConvertTo-SecureString -asPlainText -Force
$cred = New-Object System.Management.Automation.PSCredential($username, $password)
Login-AzureRmAccount -TenantId $tenantid -Credential $cred
#------------------------If you have multiple subscriptionId in single account-----------#
$subscriptionId = (Get-AzureRmSubscription | Out-GridView -Title "Select an Azure Subscription …" -PassThru).SubscriptionId
#------------------------for single subscriptionId -----------#
$subscriptionId = (Get-AzureRmSubscription).SubscriptionId
#----------------------Get Storage Key -------------------------#
$Key = Get-AzureRmStorageAccountKey -ResourceGroupName "StorageTesting" -Name "storagetest122";
#--------- Use the Azure.Storage module to create a Storage Authentication Context ------------#
$StorageContext = New-AzureStorageContext -StorageAccountName "storagetest122" -StorageAccountKey $Key.Item(0).value;
#---------------------- Create azure blob storage ---------------#
New-AzureStorageContainer -Context $StorageContext -Name "imageblob" -Permission Off  
Create Azure blob storage using powershell command with ARM:
Create Azure Blob Storage Using Powershell
By Brijesh Kumar


Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn :





Facebook User: