Azure Blob storage is Microsoft’s object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data.
Use the Azure PowerShell module to create and manage Azure resources. You can create or manage Azure resources from the PowerShell command line or in scripts. This guide will help you to upload files/folders to the blob storage via script/PowerShell command.
$uploadstorage=Get-AzStorageAccount -ResourceGroupName <resource group name> -Name <storage account name>
Update the place holders <resource group name> and <storage account name> with values specific to your environment.
Here is the script code
<!-- wp:paragraph -->
<p>$uploadstorage=Get-AzStorageAccount -ResourceGroupName Storage-Group -Name <strong>StorageName</strong></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>$storcontext=$uploadstorage.Context</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Set-AzStorageBlobContent -Container "<strong>Name of Container</strong>" -File " <strong>Location of file in local disk</strong> " -Context $storcontext</p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>Copy and past in notepad save as script.ps1</p>
<!-- /wp:paragraph -->