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

I am working on automatic deployment + azure. I am at the point where I am adding the ssl certificate to the website. Does anyone know how to use PowerShell to upload an SSL certificate to a website using the PowerShell command (Add-Get-Set based command)? I can add a certificate to the cloud service using ...

New-AzureService $Program -Location 'East US'
Add-AzureCertificate -Password Cert123! -ServiceName $Program -CertToDeploy $CertLocation

but I don’t know how to add it to the azure website.

thank

edit: I found a way using the following command, but I do not want to install additional libraries on my machine for deployment.

azure site cert add -k Cert123! $CertLocation $Program
+4
source share
2 answers

, Azure PowerShell , . , Cross Platform . XPlat-CLI- , , XPlat-CLI : REST api -.

, , - , .. Invoke-WebRequest , , 200 . Invoke-RESTMethod, XML- ( ). Invoke-WebRequest .

Microsoft Azure Management Libraries ( PowerShell) -. WebSiteUpdateParameters SSLCertificates. , .

+3

Azure PowerShell v. 1.1.0, -.

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

https://azure.microsoft.com/en-us/documentation/articles/app-service-web-app-powerhell-ssl-binding/

+4

Source: https://habr.com/ru/post/1536482/


All Articles