在 powershell 中获取 blob 存储内容

Bar*_*osz 2 powershell azure azure-storage-blobs

我正在使用 Get-AzureStorageBlobContent 命令来获取包含我的应用程序版本的 blob:

$latestDeployment = (Get-AzureStorageBlobContent -Blob app.version -Container container -Context $blobContext)
Run Code Online (Sandbox Code Playgroud)

此命令将其作为文件保存到磁盘,而我想将其加载到内存中,只读取内容而不保存任何内容。可以使用powershell吗?

x56*_*657 6

这应该工作

$latestDeploymentBlob = Get-AzureStorageBlob -Blob app.version -Container $container -Context $blobContext 
$latestDeployment = $latestDeploymentBlob.ICloudBlob.DownloadText()
Run Code Online (Sandbox Code Playgroud)