Skip to content

Instantly share code, notes, and snippets.

@fabiocannas
Created October 10, 2024 16:40
Show Gist options
  • Save fabiocannas/f3427680d2c45fc2ce956fbe5b43d528 to your computer and use it in GitHub Desktop.
Save fabiocannas/f3427680d2c45fc2ce956fbe5b43d528 to your computer and use it in GitHub Desktop.
Get certificate from Let's Encrypt
Set-ExecutionPolicy RemoteSigned
Install-Module -Name Posh-ACME
$contactMail="<contact_mail>"
$domain="<domain>"
$password="<password>"
Set-PAServer LE_PROD
New-PACertificate $domain -AcceptTOS -Contact $contactMail -DnsPlugin AcmeDns -PluginArgs @{ACMEServer='auth.acme-dns.io'} -PfxPass $password
Write-Output "You'll found the certificate inside the folder %LOCALAPPDATA%\Posh-ACME with the password you provided."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment