Wednesday, May 14, 2025

Letsencrypt certificate generation on windows


Using Posh-ACME (PowerShell Module):


Install-Module -Name Posh-ACME -Force

# Set your email for Let's Encrypt

Set-PAServer LE_PROD

 

# Create a new order

New-PACertificate yourdomain.com -AcceptTOS -Contact youremail@example.com

 

# For DNS validation (if needed)

# Follow the instructions to create DNS TXT records


 to get key :

-----------

$cert = Get-PACertificate -MainDomain "subdomain.maindomain.com"

Get-Content -Path $cert.KeyFile | Out-File "C:\temp\unencrypted.key" -Encoding ASCII


pem file:

----

C:\Users\username\AppData\Local\Posh-ACME\LE_PROD\<OrderID>\fullchain.cer

rename to fullchain.pem




No comments:

Post a Comment