gpt4 book ai didi

powershell - 新-AzureRmADAppCredential : Exception of type 'System.Exception' was thrown

转载 作者:行者123 更新时间:2023-12-03 00:34:58 24 4
gpt4 key购买 nike

我试图通过 PowerShell 为 SPN 保密,并看到以下内容:New-AzureRmADAppCredential:引发了“System.Exception”类型的异常

以下是我所做的导致该错误的原因以及如何修复它。

  1. 已创建 SPN:New-AzureRmADApplication -DisplayName $adAppName -HomePage $adAppHomePage -IdentifierUris $adAppIdentifierUri -KeyCredentials $keyCredential

  2. 从门户创建密码

  3. 尝试从 PowerShell 创建新密码:New-AzureRmADAppCredential -ObjectId 2222-3333-444 -Password 'wakatester'

  4. 看到以下错误:New-AzureRmADAppCredential:引发了“System.Exception”类型的异常。

  5. 经过调试并看到以下内容:“value”:“不允许使用 KeyId '677dddaaa-4rde-bgt5-853a-2e02bce4c2f1' 更新现有凭据。”

  6. 要解决此问题,我删除了从门户创建的所有 secret

  7. 返回 PowerShell 并创建新证书,没有问题

最佳答案

使用-调试开关查看哪个参数不正确。

关于powershell - 新-AzureRmADAppCredential : Exception of type 'System.Exception' was thrown,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44168651/

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