This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Trying to run a PowerShell script for webpage fails

SAM 6.2.2

I have a PowerShell script that I am using to scrap data off of a website and it works fine when I run it on the Orion server PowerShell ISE. When I put the code into a SAM PowerShell it errors out

----

Invoke-WebRequest: Unable to connect to the remote server

At line 12

----

My code at line 12 is (keep in mind this is working from the Orion server PowerShell ISE)

..

$content = Invoke-WebRequest -Url $Url -UseBasicParsing | Select-Object -ExpandProperty Content

..

I have tried various troubleshooting steps including testing with all of the options in the template - no change.

Any idea what is going on here?