有没有办法使用 powershell 获取经典 Azure 存储帐户的密钥?

Posted

技术标签:

【中文标题】有没有办法使用 powershell 获取经典 Azure 存储帐户的密钥?【英文标题】:Is there a way to get the key for Classic Azure Storage Account using powershell? 【发布时间】:2018-04-28 00:15:13 【问题描述】:

我认为 Get-AzureRmStorageAccountKey 不适用于经典 Azure 存储帐户。 Get-AzureStorageAccount 可以返回经典存储帐户,但不会返回密钥。

谢谢。 立东

【问题讨论】:

【参考方案1】:

您可以使用 cmdlet:Get-AzureStorageKey

Get-AzureStorageKey -StorageAccountName "ContosoStore01"

【讨论】:

据此:***.com/a/34963304/669692 对于经典资源,您需要在其前面添加 Add-AzureAccount 和 Select-AzureSubscription

以上是关于有没有办法使用 powershell 获取经典 Azure 存储帐户的密钥?的主要内容,如果未能解决你的问题,请参考以下文章