Skip to content

Instantly share code, notes, and snippets.

@gwdt

gwdt/getCA.ps1 Secret

Created Oct 17, 2020
Embed
What would you like to do?
Exports mkcert root CA from windows cert store and encodes as base 64 cer (PEM)
$path = "./certs/"
$temp = "$path/in.cer"
Get-Item Cert:\CurrentUser\Root\* | Where-Object { $_.Subject -like "*mkcert*" } | Export-Certificate -Type CERT -FilePath $temp -Verbose
certutil -encode $temp "$path/ExtraCA.cer"
Remove-Item $temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.