powershell - AzureKeyVaultSecret 备份/导入 powershell 命令在哪里?

标签 powershell azure scripting azure-keyvault

我需要从 Azure 中的 key 保管库导出所有 secret ,但出现以下错误:

Backup-AzureKeyVaultSecret : The term 'Backup-AzureKeyVaultSecret' is not recognized as the name of a cmdlet, function, script file, or operable program.

根据the documentation该命令位于 AzureRM.KeyVault 模块中,但不在我的计算机上:

> PS C:\> get-module AzureRM
> 
> ModuleType Version    Name                               
> ExportedCommands
> ---------------- Script     4.4.1      AzureRM                             {Add-AzureAnalysisServicesAccount, Add-AzureKeyVaultCertif...
> 
> 
>PS C:\> Get-Command -Module AzureRM.KeyVault -Noun azurekeyvault*|Select-Object Name, Version

Name                                             Version
----                                             -------
Set-AzureKeyVaultKey                             3.4.1
Add-AzureKeyVaultCertificate                     2.8.0
Add-AzureKeyVaultCertificateContact              2.8.0
Add-AzureKeyVaultKey                             2.8.0
Backup-AzureKeyVaultKey                          2.8.0
Get-AzureKeyVaultCertificate                     2.8.0
Get-AzureKeyVaultCertificateContact              2.8.0
Get-AzureKeyVaultCertificateIssuer               2.8.0
Get-AzureKeyVaultCertificateOperation            2.8.0
Get-AzureKeyVaultCertificatePolicy               2.8.0
Get-AzureKeyVaultKey                             2.8.0
Get-AzureKeyVaultSecret                          2.8.0
Import-AzureKeyVaultCertificate                  2.8.0
New-AzureKeyVaultCertificateAdministratorDetails 2.8.0
New-AzureKeyVaultCertificateOrganizationDetails  2.8.0
New-AzureKeyVaultCertificatePolicy               2.8.0
Remove-AzureKeyVaultCertificate                  2.8.0
Remove-AzureKeyVaultCertificateContact           2.8.0
Remove-AzureKeyVaultCertificateIssuer            2.8.0
Remove-AzureKeyVaultCertificateOperation         2.8.0
Remove-AzureKeyVaultKey                          2.8.0
Remove-AzureKeyVaultSecret                       2.8.0
Restore-AzureKeyVaultKey                         2.8.0
Set-AzureKeyVaultCertificateAttribute            2.8.0
Set-AzureKeyVaultCertificateIssuer               2.8.0
Set-AzureKeyVaultCertificatePolicy               2.8.0
Set-AzureKeyVaultKeyAttribute                    2.8.0
Set-AzureKeyVaultSecret                          2.8.0
Set-AzureKeyVaultSecretAttribute                 2.8.0
Stop-AzureKeyVaultCertificateOperation           2.8.0

请注意,Backup-AzureKeyVaultKey 存在,但没有 Backup-AzureKeyVaultSecret。我尝试了 Update-Module AzureRM 但没有新命令。这东西在哪里?

最佳答案

建议通过 GitHub 下载并安装最新的 Azure Powershell MSI 安装程序:https://github.com/Azure/azure-powershell/releases

目前可以通过以下直接链接获得最新版本:https://github.com/Azure/azure-powershell/releases/download/v4.4.1-October2017/azure-powershell.4.4.1.msi

我遇到了同样的问题,安装 MSI 有助于解决该问题。

关于powershell - AzureKeyVaultSecret 备份/导入 powershell 命令在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47053840/

相关文章:

linux - unix bash - 保存环境变量和循环

bash - "Standardized"bash 脚本的文档字符串/ self 文档

预处理阶段不断折叠

Powershell循环和替换(从文本文件读取)

powershell - 使用 PowerShell 从 Windows 10 中删除语言

c# - Azure 存储队列是否没有新消息到达事件?

java - Azure 服务总线队列 - JMS 消息监听器调用程序设置因目标异常而失败

azure - Azure 点到站点 VPN 下载中缺少 VpnClientSetupAMD64.exe

powershell - 为什么 'invoke-history' 卡在 powershell 中?

azure - 使用 Microsoft Graph 如何获取从 On Premise AD 同步的 Azure AD 用户字段