Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell steps to create free App Service Managed Certificate #65338

Closed
Ayanmullick opened this issue Oct 31, 2020 · 6 comments
Closed

PowerShell steps to create free App Service Managed Certificate #65338

Ayanmullick opened this issue Oct 31, 2020 · 6 comments

Comments

@Ayanmullick
Copy link
Contributor

Ayanmullick commented Oct 31, 2020

Is there documentation on how one could create a free App Service Managed Certificate thru PowerShell? The steps aren't included in the script on the page.

https://docs.microsoft.com/en-us/azure/app-service/configure-ssl-certificate#powershell

@PramodValavala-MSFT


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@ChaitanyaNaykodi-MSFT
Copy link
Contributor

Hello @Ayanmullick, Thank you for your feedback! We will review and update as appropriate.

@AjayKumar-MSFT
Copy link
Contributor

@Ayanmullick, You may use the workaround script to use with PowerShell.

@Ayanmullick
Copy link
Contributor Author

Thanks @AjayKumar-MSFT , I was able to deploy the certificate using the workaround. How do I provide the path and the password for the cmdlet for binding?

New-AzWebAppSSLBinding -WebAppName $webappname -ResourceGroupName $webappname -Name $fqdn -CertificateFilePath $pfxPath -CertificatePassword $pfxPassword -SslState SniEnabled

@krispenner
Copy link

@Ayanmullick I believe CertificateFilePath and CertificatePassword are for uploading a certificate, since the managed certificate is already available you will need to specify the thumbprint of it using the Thumbprint parameter instead. You will need to dynamically retrieve the thumbprint of the newly created managed certificate similar to how the workaround template does it.

"certificateThumprint": {
    "value": "[reference(resourceId('Microsoft.Web/certificates', variables('certificateName'))).Thumbprint]"
}

@Ayanmullick
Copy link
Contributor Author

Ayanmullick commented Nov 4, 2020

$(Get-AzWebAppCertificate -ResourceGroupName <>).Thumbprint got the thumbprint and was able to do the binding too.

Thanks @AjayKumar-MSFT and @krispenner. It'd be great if a certificate creation cmdlet could be added to Az.Websites PowerShell module

@AjayKumar-MSFT
Copy link
Contributor

@Ayanmullick, Glad to know it works now. We have shared your feedback with the concerned product/content owner to update the doc as appropriate. Thanks for your feedback and update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants