gpt4 book ai didi

powershell - 术语 'Set-AzureKeyVaultKeyAttributes' 未被识别为 cmdlet 的名称,

转载 作者:行者123 更新时间:2023-12-02 06:31:51 24 4
gpt4 key购买 nike

在我的 Windows 10 上,我安装了 Powershell 5.0。但是当我对其运行以下命令时,出现上述错误。

PS命令:

Set-AzureKeyVaultKeyAttributes -Name Key2 -VaultName KayVault-abctest -Enable $false

错误

Set-AzureKeyVaultKeyAttributes : The term 'Set-AzureKeyVaultKeyAttributes' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + Set-AzureKeyVaultKeyAttributes -Name Key2 -VaultName KayVault-abctest ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Set-AzureKeyVaultKeyAttributes:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

注意我在此 official Azure lab 中使用主题创建 key (门户)教程。

最佳答案

我认为 cmdlet 的名称应该是单数 Set-AzureKeyVaultKeyAttribute ,而不是复数 Set-AzureKeyVaultKeyAttributes。请注意,这是 Strongly Encouraged Development Guidelines 之一适用于 Microsoft 的 Powershell:

To enhance the user experience, the noun that you choose for a cmdlet name should be singular. For example, use the name Get-Process instead of Get-Processes. It is best to follow this rule for all cmdlet names, even when a cmdlet is likely to act upon more than one item.

如果您在使用单数名称时仍然遇到相同的问题,请确保 AzureRM.KeyVault模块已安装并加载:

Install-Module AzureRM.KeyVault
Import-Module AzureRM.KeyVault

关于powershell - 术语 'Set-AzureKeyVaultKeyAttributes' 未被识别为 cmdlet 的名称,,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47562780/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com