The issue is that I got a script from a vendor to pull data from a DB. The script is having a problem with the Invoke-WebRequest Section.
Here is the Script:
$url = @'
https://demo.liquidwarelabs.com/lwl/api?json={"inspector":"0","basis":"users","date":"yesterday","limit":"0","columns":"user_name,login_count","output":"1:html","header":"1"}
'@
$output = "c:\export\Tier1\view1.csv"
Invoke-WebRequest $url -OutFile $output
Here is the Error I get:
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send. At C:\Scripts\3.ps1:38 char:1 + Invoke-WebRequest $url -OutFile $output + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand