【发布时间】:2021-01-10 00:33:07
【问题描述】:
我有一个 Azure DevOps 管道来轮换 Cosmos DB 帐户密钥。为此,我使用 PowerShell 和 New-AzCosmosDBAccountKey cmdlet。
由于某些未知原因,Az.CosmosDB 模块没有与Az 一起安装,因此每次运行管道时都需要手动安装。
Install-Module -Name Az.CosmosDb -AllowClobber -Force
当我在本地运行时,一切都按预期工作,但在 Azure DevOps 中我看到一个错误
在模块“Az.CosmosDB”中找到“Get-AzCosmosDBAccountKey”命令,但无法加载该模块。
Azure DevOps 中可能会发生什么与本地发生的不同?
【问题讨论】:
标签: powershell azure-devops pipeline powershell-module