IIS 7 and Above
Getting Thirdparty SSL via scripts
Last post Jan 04, 2011 04:07 AM by suchiwa
Nov 03, 2010 09:38 AM|rkr31|LINK
I need to automate our shared hosting platform so that we can automatically install SSL Certs for sites. Is there any way to do this in powershell?
I guess i need to generate a CSR (lets say we do it for GeoTrust)
Then i need to send that CSR off to them (this part can be done by our internal systems)
Then i need to add the response to the server thus activating the SSL.
Nov 07, 2010 03:56 PM|rkr31|LINK
Nov 11, 2010 08:09 AM|rkr31|LINK
I got to the bottom of this by calling certutil and certreq from within powershell. It's ugly but worked :)
See below for the scripts
Jan 04, 2011 04:07 AM|suchiwa|LINK
I worked with selfSSL to create certificates.
# Create SSL Certificate
$FQDN = $env:computername
selfSSL /T /N:CN=$FQDN /V:3650 /S:2 /Q
# Identify SSL thumbprint
$thumbPath = ls cert:\LocalMachine\My
# SSL Certifcate
appcmd set config /section:system.applicationHost/sites /siteDefaults.ftpServer.security.ssl.serverCertHash:$certHash /commit:apphost