Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
powershell script that exports trusted root certificate authorities on Windows machine
$type = [System.Security.Cryptography.X509Certificates.X509ContentType]::Cert
get-childitem -path cert:\LocalMachine\AuthRoot | ForEach-Object {
$hash = $_.GetCertHashString()
[System.IO.File]::WriteAllBytes("$hash.der", $_.export($type) )
}
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.