Skip to content

Instantly share code, notes, and snippets.

@zakird
Created August 23, 2014 02:05
Show Gist options
  • Select an option

  • Save zakird/a8582ced2f50cfe1c702 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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

@bhofsvang

Copy link
Copy Markdown

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

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

@Eboubaker

Copy link
Copy Markdown

Can you provide script to import them all?

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