【问题标题】:My code for New-AzureRmWebAppSSLBinding is not being recognised in Azure CloudshellAzure Cloud Shell 无法识别我的 New-AzureRmWebApp 绑定代码
【发布时间】:2019-08-29 11:20:15
【问题描述】:

我正在尝试添加新的绑定并收到 Microsoft 提供的以下指南的链接:

https://docs.microsoft.com/en-us/powershell/module/azurerm.websites/new-azurermwebappsslbinding?view=azurermps-6.13.0

我已经尝试了代码的每次迭代来添加一个新的绑定,但我没有成功收到错误:

Get-AzureRmWebAppSSLBinding : 操作返回无效状态代码“NotFound”

使用 is 的代码示例

New-AzureRmWebAppSSLBinding -ResourceGroupName“productResourceGroup”-WebAppName“webApp-staging-product-productgroup-1”-Thumbprint“i4j3u3oiejrngjroeidjfnf443irujfnfuj34”-名称“staging-product.company.co.uk”-CertificateFilePath“C:\Documents\ CJeans\Certificate" -CertificatePassword "密码"

【问题讨论】:

    标签: azure ssl binding


    【解决方案1】:

    嗯,路径C:\Documents\CJeans\Certificate 很可能在 CloudShell 上不存在。

    它不使用本地驱动器,而是从 Azure 存储帐户挂载文件存储。您需要在那里上传证书。

    【讨论】:

    • 我还通过笔记本电脑上的 Powershell 应用程序连接到 Azure,并尝试在那里运行它,但脚本仍然出现 NotFound 无效状态
    • 如果您使用多个订阅,您还应该运行 Select-AzureRmSubscription 以确保您在正确的订阅上运行脚本。
    猜你喜欢
    • 1970-01-01
    • 2023-02-15
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-05
    • 1970-01-01
    • 2023-03-04
    相关资源
    最近更新 更多