Misc/Get-FileFromStorage.ps1
<#
.synopsis Download file from a storage account .description Downloads a filed from a storage account without requiring authentication .parameter fileName Url to the file .example $filename = Get-FileFromStorage -fileName "https://storageurl" #> function Get-FileFromStorage { Param( [Parameter(Mandatory=$true)] [string] $fileName ) if ($fileName.StartsWith("https://") -or $fileName.StartsWith("http://")) { $fileNameUrl = $fileName $tempFilename = New-TemporaryFile (New-Object System.Net.WebClient).DownloadFile($fileNameUrl, $tempFilename) } $tempFilename.FullName } Export-ModuleMember Get-FileFromStorage |