Knowledge Base
Authentication is disabled (development mode).

Powershell: Export locally installed root CA certificates

Edit

ca-certificates ca-trust cert certificate certificates export powershell root store trust windows x509

# Initialize an empty string to hold the PEM encoded certificates
$certContent = ""

Get-ChildItem Cert:\LocalMachine\Root |
Foreach-Object {
   # Convert the certificate to Base64 and format it as PEM
  $pem = "-----BEGIN CERTIFICATE-----`r`n" +
            [System.Convert]::ToBase64String(
                     $_.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
           ),
            [System.Base64FormattingOptions]::InsertLineBreaks) +
         "`r`n-----END CERTIFICATE-----`r`n"

     $certContent += $pem
}

# Write the PEM content to the output file
Set-Content -Path ca-certificates.pem -Value $certContent