The method you used to ignore SSL certs does not work on non-Windows platforms with PowerShell core, MacOS in my case, due to missing .Net dependencies. This is the error I'm getting on Mac:
add-type : (3,40): error CS0246: The type or namespace name 'ICertificatePolicy' could not be found (are you missing a using directive or an assembly reference?)
public class TrustAllCertsPolicy : ICertificatePolicy {
^
If I remove all the code in Set-InsecureSSL, and use the -SkipCertificateCheck switch on the Invoke-RestMethod call in Invoke-OVGDRequest, then it works
See also https://github.com/PowerShell/PowerShell/issues/1945
The method you used to ignore SSL certs does not work on non-Windows platforms with PowerShell core, MacOS in my case, due to missing .Net dependencies. This is the error I'm getting on Mac:
If I remove all the code in Set-InsecureSSL, and use the -SkipCertificateCheck switch on the Invoke-RestMethod call in Invoke-OVGDRequest, then it works See also https://github.com/PowerShell/PowerShell/issues/1945