【发布时间】:2022-01-07 00:05:15
【问题描述】:
我正在尝试使用 Azure RM powershell 模块连接到 Azure 自动化帐户中的 Stoarge 帐户。
我正在使用以下命令
Connect-AzureRMAccount -Identity
$storage = Get-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageAccountName
$srcContext = $storage.Context
$blobs = Get-AzureStorageBlob -Context $srcContext -Container $containerName -MaxCount $MaxReturn -ContinuationToken $Token
最后一行总是返回未找到的存储上下文。
我已向 MSI 提供了存储帐户所在资源组所需的权限。
【问题讨论】:
-
如果您收到任何错误消息,最好分享完整的脚本和错误消息。如果您告诉我们您在 Azure 自动化帐户中选择了哪个 AzureRM 版本,那也很棒。
标签: azure powershell azure-automation azure-storage-account azure-rm