How to add a certificate to an Azure RM website with Powershell

后端 未结 3 1232
时光取名叫无心
时光取名叫无心 2020-12-04 00:40

Lightly related to How to add an SSL certificate to an azure website using powershell?

I am trying to add a certificate to an Azure RM website via Powershell.

3条回答
  •  旧巷少年郎
    2020-12-04 01:05

    In the latest release of Azure PowerShell v 1.1.0, there is a number of new commands to handle SSL certificates in Azure Web Apps

    You can upload the certificate and bind it to hostname using

    New-AzureRmWebAppSSLBinding -ResourceGroupName myresourcegroup -WebAppName mytestapp -CertificateFilePath PathToPfxFile -CertificatePassword PlainTextPwd -Name www.contoso.com
    

    And then remove the binding but without removing the certificate, the app should be able to use it after you add a app setting referencing that cert (this should be done using the portal - the PowerShell command to do so will come soon - No ETA for now)

    Remove-AzureRmWebAppSSLBinding -ResourceGroupName myresourcegroup -WebAppName mytestapp -Name www.contoso.com -DeleteCertificate $false
    

提交回复
热议问题