![](/img/trans.png)
[英]Run Get-AzADApplication from an Azure Runbook using a Managed Identity
[英]Accessing Azure Storage from VM using Managed Identity
我正在尝试使用托管标识从 Azure Windows VM 访问 Azure 存储资源。
我已按照此处的说明进行操作https://learn.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-vm-windows-access-storage但教程中的访问部分使用我不熟悉的 .NET 完成。
相反,我想使用 Powershell 和 VM 的托管身份的组合来列出 blob 的内容,因为这适合我的用例。 这可能吗,因为我似乎无法在网上找到任何示例? 如果是,请问有人有工作示例吗?
提前致谢。
我相信你已经满足了所有的先决条件
要使用 Powershell 访问 blob 的内容,您可以使用以下命令:
Connect-AzAccount -Identity
#Get blobs in a container by using the pipeline
Get-AzStorageContainer -Name container* | Get-AzStorageBlob -IncludeDeleted
https://learn.microsoft.com/en-us/powershell/module/az.accounts/connect-azaccount?view=azps-7.4.0 https://learn.microsoft.com/en-us/powershell/module /az.storage/get-azstorageblob?view=azps-7.4.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.