1 Rookie

 • 

2 Posts

November 11th, 2024 17:44

Just for the answer. I thought I had SSL right on my server, but the self signed certs and everything weren't right.  Was able to bypass the error by adding 

Add-Type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
    public bool CheckValidationResult(
        ServicePoint srvPoint, X509Certificate certificate,
        WebRequest request, int certificateProblem) { return true; }
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy

To my script, and fix permanently by importing our wildcard SSL cert to the HTTPS site.

No Events found!

Top