【问题标题】:Azure Certificate export script giving errorAzure 证书导出脚本给出错误
【发布时间】:2018-11-05 16:55:46
【问题描述】:

运行此 Microsoft 提供的脚本 Link to MS Blog Post 以将您的 SSL 证书导出到 PFX 文件会一直在此行产生此错误。

行:$certificateProperties=Get-Member -InputObject $ascResource.Properties.certificates[0] -MemberType NoteProperty

错误:Get-Member:您必须为 Get-Member cmdlet 指定一个对象。在 C:\Users\User\Desktop\certget.ps1:14 char:24 + ... eProperties=Get-Member -InputObject $ascResource.Properties.certifica ... + ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError : (:) [Get-Member], InvalidOperationException + FullyQualifiedErrorId : NoObjectInGetMember,Microsoft.PowerShell.Commands.GetMemberCommand

还有其他人遇到此错误并找到解决方法吗?谢谢!

【问题讨论】:

  • $ascResource 变量不为空吗?
  • 感谢您的回复。该变量似乎有效: $ascResource = Get-AzureRmResource -ResourceName $appServiceCertificateName -ResourceGroupName $resourceGroupName -ResourceType "Microsoft.CertificateRegistration/certificateOrders" -ApiVersion "2015-08-01"
  • ...但它包含任何内容吗?
  • 好吧,只需检查.Properties 是否包含任何内容。 $ascResource.Properties 也是如此
  • $ascResource.Properties 和 $ascResource.Properties.certificates 都给了我看起来正确的输出 $ascResource.Properties.certificates[0] 没有给我任何输出再次感谢您的所有帮助,我比你知道的更感激它!

标签: azure certificate ssl-certificate


【解决方案1】:

我最终遵循了these technet 的说明,它给了我 PFX。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-01
    • 2014-07-08
    相关资源
    最近更新 更多