Scripts/Utility/Allow-SelfSignedCertificates.ps1

function Allow-SelfSignedCertificates
{
    # ignore self-signed server certificates
    $client = New-Object System.Net.WebClient;
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Add-Type @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
    {
        public static void Ignore()
        {
            ServicePointManager.ServerCertificateValidationCallback +=
                delegate
                (
                    Object obj,
                    X509Certificate certificate,
                    X509Chain chain,
                    SslPolicyErrors errors
                )
                {
                    return true;
                };
        }
    }
"@

    [ServerCertificateValidationCallback]::Ignore();

}