Search code examples
powershellazureworkflowazure-automation

Azure Automation - Download blob from URL


I'd like to download a blob from a URL rather than providing the blob name.

However Get-AzureStorageBlobContent doesn't have a parameter for a URL.

I'd like to use a commandlet where I don't need to specify the blob name and container name, just the URL.


Solution

  • $Source = "http://yoursite.com/file.xml"
    $Destination = "c:\application\data\newdata.xml"
    
    Invoke-WebRequest -Uri $Source -OutFile $Destination