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 ?
Question
Rahamath 0
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
Link to post
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.