Thursday, July 26, 2018

Powershell Rest Calls (invoke-restapi) fail with latest versions - Force TLS

If you start experiencing Rest-call failures in PowerShell (Invoke-RestApi, Invoke-WebRequest, ...), you should realize that NetApp has dropped SSL support.

So you must force TLS now.

This is done by adding this code at the beginning :

# Force TLS
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

1 comment :

  1. This setting of the client security protocol to use TLS12 is going to run into a problem with Datacenters having mixed DataONTAP versions. TLS12 support is not available on older ONTAP versions like 8.3 or below.

    There is no reason for WFA to restrict any security protocol. Do the below and it works for all ONTAP versions.

    [Net.ServicePointManager]::SecurityProtocol = 'Tls, Tls11, Tls12, Ssl3'