Last active
September 5, 2017 17:19
-
-
Save marcosnils/2673c34c2fec50019502199fb7d28a61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$DTR_URL) | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
invoke-webrequest -uri "https://$DTR_URL/ca" -o c:\ca.crt | |
$cert = new-object System.Security.Cryptography.X509Certificates.X509Certificate2 c:\ca.crt | |
$store = new-object System.Security.Cryptography.X509Certificates.X509Store('Root','localmachine') | |
$store.Open('ReadWrite') | |
$store.Add($cert) | |
$store.Close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment