![](/img/trans.png)
[英]how to use azure logic apps, function aps to read, write, delete files from an azure storage(file share or BLOB)
[英]Function to move/delete files within file share in Azure Storage Explorer?
我还不精通 Powershell,所以如果我使用了不正确的术语,请多多包涵。(如果我使用了,请纠正我。)
我已经安装了Az
和Azure.Storage
模块。
我还使用Connect-AZAccount
连接到我的帐户(这是最好的方法吗?因为您需要复制 URL 并通过浏览器登录)
然后我只是想查看文件,测试连接。 使用Get-AzureStorageFile
这会提示我输入共享名 - 我使用了 Azure 存储资源管理器中文件共享下的文件夹名称。 但这失败了,请参阅下面的失败
cmdlet Get-AzureStorageFile 在命令管道位置 1 提供以下参数的值:(键入 !? 寻求帮助。) ShareName:bss get-azurestoragefile:无法获取存储上下文。 请传入存储上下文或设置当前存储上下文。
要注意的其他信息,我无权访问帐户密钥,只有 SAS 令牌。
任何帮助,将不胜感激。
如果使用Connect-AzAccount
,则将使用Az
模块 powershell Get-AzStorageFile
而不是Get-AzureStorageFile
。 在运行Get-AzStorageFile
命令之前,您需要使用New-AzStorageContext
传递存储上下文以修复错误。
样本:
$context = New-AzStorageContext -StorageAccountName "<StorageAccountName>" -StorageAccountKey "<StorageAccountKey>"
Get-AzStorageFile -ShareName "<ShareName>" -Path "<ContosoWorkingFolder>" -Context $context
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.