Skip to content

Instantly share code, notes, and snippets.

@loslch
Last active May 31, 2018 06:16
Show Gist options
  • Save loslch/93d86a3240cda9e2a5993518a083c49b to your computer and use it in GitHub Desktop.
Save loslch/93d86a3240cda9e2a5993518a083c49b to your computer and use it in GitHub Desktop.
Import "root" certificates on Windows
REM download authroot.stl from http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/authrootstl.cab
certutil -addstore -f root authroot.stl
[reflection.assembly]::LoadWithPartialName("System.Security")
$certs = new-object system.security.cryptography.x509certificates.x509certificate2collection
$certs.import("C:\Users\Hun\Downloads\root_certs.sst")
$store = new-object system.security.cryptography.X509Certificates.X509Store("Root", "LocalMachine")
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]"MaxAllowed")
$store.AddRange($certs)
@loslch
Copy link
Author

loslch commented May 31, 2018

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