Currently browsing tag

ssl certificate

Add-SSLCertificate

Installs a .pfx file Function Add-SSLCertificate{ param([string]$pfxPath,[string]$pfxPassword,[string]$HostHeader,[string]$Website) Import-Module “WebAdministration” -ErrorAction Stop $certMgr = New-Object -ComObject IIS.CertObj -ErrorAction SilentlyContinue $certMgr.ImportToCertStore($PfxPath,$PfxPassword,$true,$true) New-WebBinding -Name $Website …

Generate CSR

Automation of CSR generation, uses certreq.exe $Date = (Get-Date).ToString(‘ddMMyyyy’) $WebsiteName = “ToBeDefined” $HostHeader = “ToBeDefined” $ReqFile = “Cert_Req-$WebsiteName-” + “$Date” + “.req” …

Scroll to Top