How to add an SSL certificate to an azure website using powershell? -
i working on automatic deployment + azure. i'm @ point i'm adding ssl cert website. know how use powershell upload ssl certificate website using powershell command (add - - set based commands)? i'm able add certificate cloud service using ...
new-azureservice $program -location 'east us' add-azurecertificate -password cert123! -servicename $program -certtodeploy $certlocation
but have no idea how add azure website.
thanks
edit: i've found way using following command, i'm not wanting install additional libraries on production deployment machine.
azure site cert add -k cert123! $certlocation $program
as far know azure powershell cmdlets not offer capability @ moment find. point out cross platform command line tool does. since don't want add xplat-cli tool deployment machines can use xplat-cli tool under hood: direct call against rest api web site management.
note you'll need figure out webspace site resides in, etc. can use invoke-webrequest make call can verify 200 response back. or use invoke-restmethod well, return xml document (the contents of response). invoke-webrequest provides little more control , access full response object.
the microsoft azure management libraries (which powershell cmdlets sit on top of) has web site management piece it. 1 of operations update site , includes websiteupdateparameters object sslcertificates property. may check well, though i've not done myself.
Comments
Post a Comment