如何使用 Powershell 将证书添加到 Azure RM 网站 [英] How to add a certificate to an Azure RM website with Powershell
问题描述
与 如何使用 powershell 向 azure 网站添加 SSL 证书?
我正在尝试通过 Powershell 将证书添加到 Azure RM 网站.
I am trying to add a certificate to an Azure RM website via Powershell.
我认为没有直接的 Azure Powershell 命令,需要通过 New-AzureRmResource
I don't think there is a direct Azure Powershell command, and it will need to be done via New-AzureRmResource
推荐答案
在最新版本的 Azure PowerShell v 1.1.0 中,有许多新命令用于处理 Azure Web Apps 中的 SSL 证书
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
您可以使用
New-AzureRmWebAppSSLBinding -ResourceGroupName myresourcegroup -WebAppName mytestapp -CertificateFilePath PathToPfxFile -CertificatePassword PlainTextPwd -Name www.contoso.com
然后删除绑定但不删除证书,在您添加引用该证书的应用程序设置后,应用程序应该能够使用它(这应该使用门户完成 - PowerShell 命令很快就会出现 -目前没有预计到达时间)
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
这篇关于如何使用 Powershell 将证书添加到 Azure RM 网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!