Created
August 7, 2020 07:06
-
-
Save moddingg33k/11f24eaaa379dfb08c56d28e802e734c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#requires -Version 5 | |
#requires -PSEdition Desktop | |
class TrustAllCertsPolicy : System.Net.ICertificatePolicy { | |
[bool] CheckValidationResult([System.Net.ServicePoint] $a, | |
[System.Security.Cryptography.X509Certificates.X509Certificate] $b, | |
[System.Net.WebRequest] $c, | |
[int] $d) { | |
return $true | |
} | |
} | |
[System.Net.ServicePointManager]::CertificatePolicy = [TrustAllCertsPolicy]::new() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment