Total Page Preview:   000000017753

Azure Powershall - Upload file to azure blob storage using powershell command with ARM

In this article I am going to explain how to upload files or images into blob storage using powershell command .

 

Powershell Scripts For File Or Image Upload Into Blobs
 
Powershell Command :
 

Login-AzureRmAccount

 

### Obtain the Storage Account authentication keys 

$Keys = Get-AzureRmStorageAccountKey -ResourceGroupName RecouceGroup -Name ithubcitystorage;

 

$Keys.Item(0).value

### Use the Azure.Storage module to create a Storage Authentication Context

$StorageContext = New-AzureStorageContext -StorageAccountName ithubcitystorage -StorageAccountKey $Keys.Item(0).value;

### Upload a file to the Microsoft Azure Storage Blob Container

$UploadFile = @{

    Context = $StorageContext;

    Container = 'images';

    File = "F:\logo.jpg";

    }

Set-AzureStorageBlobContent @UploadFile;

 

Login into azure subscription

 

Powershell Scripts For File Or Image Upload Into Blobs
 
After load files or Images successful in powershell :
 
Powershell Scripts For File Or Image Upload Into Blobs
 
File of Image uploaded into azure portal
 
Powershell Scripts For File Or Image Upload Into Blobs
 
 
Thanks !

 

 

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 : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: