如何将证书添加到Azure的RM网站使用PowerShell [英] How to add a certificate to an Azure RM website with Powershell
问题描述
轻轻相关<一href=\"http://stackoverflow.com/questions/23066463/how-to-add-an-ssl-certificate-to-an-azure-website-using-powershell\">How中使用PowerShell SSL证书添加到蔚蓝的网站?
我试图证书添加到通过PowerShell中的Azure RM网站。
I am trying to add a certificate to an Azure RM website via Powershell.
我不认为这是一个直接的Azure PowerShell命令,这将需要通过做新AzureRmResource
I don't think there is a direct Azure Powershell command, and it will need to be done via New-AzureRmResource
推荐答案
在Azure中的PowerShell 1.1.0的最新版本,有一些新的指令来处理Azure的Web应用程序的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
您可以上传证书并将其绑定到使用主机名
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
然后删除绑定,但不删除证书,应用程序应该能够添加一个应用程序设置引用该证书后使用它(这应该使用门户来完成 - PowerShell命令这样做将很快到来 - 无ETA现在)
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
这篇关于如何将证书添加到Azure的RM网站使用PowerShell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!