0 Replies Latest reply on Nov 30, 2017 10:35 AM by sotherls

    Trying to run a PowerShell script for webpage fails

    sotherls

      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?