Forum Discussion

Rahamath's avatar
7 years ago
Solved

Powershell 5

Hello,

I had developed some powershell scripts in 3.0 to connect using Powershell Invoke-RestMethod cmdlets and was working fine. Today I upgraded my machine to Win 10 with Powershell 5.1 and all scripts stopped working with below error. Any changes we need to do in code ?

==================================================

+ ...  $response = Invoke-RestMethod -Uri $url -Method Get -Header $headers
+                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebE 
   xception
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

  • Did you configure your scripts to use TLS1.1 or later by default? I have version 5.0 installed on my Windows 8.1 machine and I know that still defaults to TLS1.0, which LogicMonitor no longer supports. 

2 Replies

Replies have been turned off for this discussion
  • Did you configure your scripts to use TLS1.1 or later by default? I have version 5.0 installed on my Windows 8.1 machine and I know that still defaults to TLS1.0, which LogicMonitor no longer supports.