Skip to content

Ignore SSL certs on PowerShell core #11

Description

@VincentBerger

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 PowerShell/PowerShell#1945

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions