Skip to main content

Let's Encrypt on Windows

Let's Encrypt Homepage

Posh-ACME

Use Post-ACME to request SAN SSL Certificate for ADFS Server

# Request SSL SAN Certificate from Let's Encrypt
# https://github.com/rmbolger/Posh-ACME
# Minimum PowerShell version: 5.1

# Install Posh-ACME

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

# install for all users (requires elevated privs)
Install-Module -Name Posh-ACME

# install for current user
# Install-Module -Name Posh-ACME -Scope CurrentUser

# Get-ExecutionPolicy
Set-ExecutionPolicy RemoteSigned -Force -Scope CurrentUser

# Open firewall port tcp:80 - Use for http-challange method
# netsh advfirewall firewall add rule name = HTTP dir = in protocol = tcp action = allow localport = 80 profile = PUBLIC

$pfxpass = "password-to-protect-cert-file"
$contact_email = "your-email-address"
$domainname = "your-public-domain-name"
$cn = "adfs.${domainname}"
$san1 = "sts.${domainname}"
$san2 = "enterpriseregistration.${domainname}"
$san3 = "certauth.adfs.${domainname}"

# New-PACertificate "*.${domainname}",$domainname -AcceptTOS -Contact $contact_email

# Request SSL Cert using Godaddy's API Key&Secret
# $gdSecret = Read-Host Secret -AsSecureString
$gdkey = "godaddy-api-key"
$gdsecret = "godaddy-api-secret"
$pArgs = @{GDKey=$gdkey;GDSecret=$gdsecret}

New-PACertificate $cn,$san1,$san2,$san3 -DnsPlugin GoDaddy -PluginArgs $pArgs -AcceptTOS -Contact $contact_email -PfxPass $pfxpass -Install

# Get SSl Cert
Get-PACertificate | Format-List

Popular posts from this blog

Hydra: Notes

Hydra v9.1 (c) 2020 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).

VMware vCenter: user@vsphere.local password expired - Authentication Failure

SSO log file: C:\ProgramData\VMware\vCenterServer\logs\sso\vmware-sts-idmd.log [2017-10-15T12:19:28.148+07:00 vsphere.local        e18baecc-2ce5-479a-adec-1bcbef603cdb ERROR] [IdentityManager] Failed to authenticate principal [tuyendq@vsphere.local]. User password expired. [2017-10-15T12:19:28.148+07:00 vsphere.local        e18baecc-2ce5-479a-adec-1bcbef603cdb INFO ] [IdentityManager] Authentication failed for user [tuyendq@vsphere.local] in tenant [vsphere.local] in [15] milliseconds with provider [vsphere.local] of type [com.vmware.identity.idm.server.provider.vmwdirectory.VMwareDirectoryProvider] [2017-10-15T12:19:28.148+07:00 vsphere.local        e18baecc-2ce5-479a-adec-1bcbef603cdb ERROR] [ServerUtils] Exception 'com.vmware.identity.idm.PasswordExpiredException: User account expired: {Name: tuyendq, Domain: vsphere.local}' com.vmware.identity.idm.PasswordExpiredException: User account expired: {Name: tuyendq, D...

Linux command: grep - Global Regular Expression Print

grep command grep, egrep, fgrep, rgrep - print lines matching a pattern