Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Kilsgaard
Posts: 25
Last visit: Fri Jan 26, 2024 11:37 am
Has voted: 1 time

Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.

Post by Kilsgaard »

Hi

I have the same problem as: https://www.sapien.com/viewtopic.php?f=12&t=16179

Product, version and build: Powerhell Studio 2023 - 5.8.215
Operating system: Windows 11 Enterprise
PowerShell version(s): V5 - 64 Bit

When I try to make an: Invoke-WebRequest
I get the following error:
ERROR: Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
ERROR: Parameter name: Value

See screenshot here:
https://1drv.ms/u/s!AsGHX7viEiYdp8xzzHu ... g?e=eEpJar

But when I run my code in a Terminal with Powerhell V5 - in the same usercontext, and on same macine.
Everything works perfect.

do you have any idear what can be wrong?
It worked perfect when I was using Powershell Studio 2022, have worked with this script in both versions.

Best
Graves Kilsgaard
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.

Post by Alexander Riedel »

We have identified the issue. It will be part of an upcoming service build.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Kilsgaard
Posts: 25
Last visit: Fri Jan 26, 2024 11:37 am
Has voted: 1 time

Re: Invoke-WebRequest : Value of '-1' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.

Post by Kilsgaard »

So fantastic, thanks a lot :-)

Best
Graves Kilsgaard
This topic is 1 year and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.