Temporary Lower Certificate security to connect VRA VRO

PowerVRA and PowerVRO do a fantastic job at assisting with connecting to VRO and VRA. When working with Self Signed certificates, using the switch “–IgnoreCertRequirements” will usually allow connection to proceed. Occasionally a more drastic approach is required. 

I often use the following bit of code to enable the connection. I do apologise for not being state the source of this, I have had it save in my library for quite a while and usually use it as is.

if (-not ([System.Management.Automation.PSTypeName]'ServerCertificateValidationCallback').Type)
$certCallback = @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
        public static void Ignore()
            if(ServicePointManager.ServerCertificateValidationCallback ==null)
                ServicePointManager.ServerCertificateValidationCallback += 
                        Object obj, 
                        X509Certificate certificate, 
                        X509Chain chain, 
                        SslPolicyErrors errors
                        return true;
    Add-Type $certCallback

$SecurityProtocols = @(
    [System.Net.ServicePointManager]::SecurityProtocol = $SecurityProtocols -join ","

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s