Advertisement
Guest User

Untitled

a guest
May 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. ##############################################################
  2. add-type @"
  3. using System.Net;
  4. using System.Security.Cryptography.X509Certificates;
  5. public class TrustAllCertsPolicy : ICertificatePolicy {
  6. public bool CheckValidationResult(
  7. ServicePoint srvPoint, X509Certificate certificate,
  8. WebRequest request, int certificateProblem) {
  9. return true;
  10. }
  11. }
  12. "@
  13. [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
  14. ##############################################################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement