Skip to content

Instantly share code, notes, and snippets.

@eeskildsen
Last active July 1, 2020 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eeskildsen/100cd61409d2a1ac5c56ff5e7c2937dd to your computer and use it in GitHub Desktop.
Save eeskildsen/100cd61409d2a1ac5c56ff5e7c2937dd to your computer and use it in GitHub Desktop.
# Posh-ACME is for getting Let's Encrypt certificates
# Install for all users (requires elevation)
Install-Module -Name Posh-ACME -Scope AllUsers
# Get a wildcard cert
$domain = Read-Host 'Domain'
$certNames = "*.$domain", $domain
$email = "admin@$domain"
$pArgs = @{} # TODO
# Generate a certificate using manual DNS verification
# By default, certs are written to subfolders of $env:LOCALAPPDATA\Posh-ACME\acme-v02.api.letsencrypt.org
# By default, the PFX file's password is poshacme
New-PACertificate $certNames -AcceptTOS -Contact $email
# Or generate a certificate, using the name.com DNS plugin for DNS verification
New-PACertificate $certNames -AcceptTOS -Contact $email -DnsPlugin NameCom -PluginArgs $pArgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment