Skip to content

Instantly share code, notes, and snippets.

@zakird
Created August 23, 2014 02:05
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zakird/a8582ced2f50cfe1c702 to your computer and use it in GitHub Desktop.
Save zakird/a8582ced2f50cfe1c702 to your computer and use it in GitHub Desktop.
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) )
}
@skgandikota
Copy link

Zakird it tried exporting certificates it did not wok on win 10

@BjornHofsvang
Copy link

Zakird it tried exporting certificates it did not wok on win 10

Run it in a windows opened as "Run as administrator"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment