New-WebServiceProxy SSL/TLS Error RRS feed

  • Question

  • Good Afternoon All, 

    Apologies I know variation of this question have already been asked and answered on the forum. I am trying to use New-WebServiceProxy to talk to the Web Service of our Cisco Call Manager. This involves me first downloading the WSDL file, and creating the WebService Proxy object based on that file. 

    $WebClient = New-WebServiceProxy -URI (Downloaded WSDL File) -credentials Get-Credentials
    $WebClient.URL = "Https:\\URLoftheCUCM"

    While the object creates succesfully, when I attempt to initiate a method from the object. I get the following: 

    "The Request was aborted. Could not Create SSL/TLS Secure Channel"

    Now I have tried the following to bypass any certificate checks. 

    [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

     and also; 

    add-type @"

        using System.Net;

        using System.Security.Cryptography.X509Certificates;      

        public class TrustAllCertificatePolicy : ICertificatePolicy


            public bool CheckValidationResult(

                ServicePoint srvPoint,

                X509Certificate certificate,

                WebRequest request,

                int certificateProblem)


                return true;




    [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertificatePolicy 

    Unfortunately though still get the error when trying to initiate a webrequest. Any assistance is appreciated, 

    Wednesday, January 3, 2018 6:02 PM

All replies

  • You have to enable the TLS2 protocol if the site requires it.


    Wednesday, January 3, 2018 6:14 PM
  • PS > [System.Net.ServicePointManager]::SecurityProtocol
    Ssl3, Tls
    PS > [System.Net.ServicePointManager]::SecurityProtocol+='tls12'
    PS > [System.Net.ServicePointManager]::SecurityProtocol
    Ssl3, Tls, Tls12


    Wednesday, January 3, 2018 6:17 PM
  • Many thanks for that information. Unfortunately that still didn't allow the command to complete. 
    Thursday, January 4, 2018 10:04 AM