Questions tagged [invoke-webrequest]
256 questions
0
votes
1 answer
Invoke-WebRequest and Invoke-RestMethod Not Returning Values in System.Object[]
I'm hitting an endpoint with this data:
{
"Id": "variableset-Projects-922",
"Variables": [
{
"Id": "30bf54b6-2e07-100f-d9f4-26879b3e9462",
"Name": "test",
"Value": "blah blah",
"Description": null,
"Scope": {},
…

cb32
- 1
- 1
0
votes
2 answers
Invoke-WebRequest content ConvertFrom-Json: Conversion from JSON failed with error: Unexpected character encountered while parsing value (CR;LF)
I successfully sent an webrequest to a Website and got a responde:
$Uri = "https://URLXYZ"
$Method = "POST"
$Header = @{
"Accept" = "*/*";
"Connection" = "keep-alive";
"Accept-Encoding" = "gzip, deflate, br";
"Content-Type" =…

kaiaschulz
- 35
- 1
- 6
0
votes
1 answer
PowerShell 7.2 and Invoke-WebRequest Issue
I am remodeling my house and need to compare material prices from different websites in order to get the best deal. I am trying to use PowerShell 7.2 and the Invoke-WebRequest command to scrape the item cost. For the life of me, I can't get the…
0
votes
1 answer
Parsing a JSON Byte Stream Returned from a Web Request using Powershell without writing to a file
I'm using the following Powershell to call a URL that returns a JSON file. (If you were to paste the URL into the browser it would download a file, rather than display the raw JSON):
$fileName = "output.json"
$url =…

James Wiseman
- 29,946
- 17
- 95
- 158
0
votes
0 answers
Long running invoke request no response
I have a long-running post request to a rest endpoint which might take a few minutes to finish and I need the response from it to start another
I have tried using Invoke-RestMethod and Invoke-WebRequest but both seem to not be able to track the…

et3rnal
- 322
- 4
- 17
0
votes
1 answer
Invoke-WebRequest POST InFile from remote network chain of events
Invoke-WebRequest -Headers $headers -Method "POST" -Uri $uri -InFile $fileToAttach
In the above web request:
$uri points to a public website.
$fileToAttach points to a remote file share (Access via VPN).
My connection is public internet (home…

Jeremy
- 3
- 1
0
votes
1 answer
How to upload and delete file of Azure web app using PowerShell
I am currently building an app service on Azure and want to write a PowerShell script to upload/delete files to the app service from the local side. I used Invoke-WebRequest to upload file and Invoke-RestMethod to delete file, but Catch [Exception]…

Eric46900
- 3
- 1
- 1
- 4
0
votes
0 answers
invoke-webrequest download image from list
I'm trying to download a SQL list with several URL images and store them in a local directory divided by name. I've already started doing it but I confess I got lost.
I used invoke-webrequest in powershell
Table SQL…

Hugo Pereira
- 39
- 5
0
votes
0 answers
The underlying connection was closed: The connection was closed unexpectedly for neo4j powershell script
I have a powershell script I am trying to use to run queries on a neo4j database. Following the steps here: https://github.com/RamblingCookieMonster/PSNeo4j.
The issue is that when I run the code with proper creds and URL, I get a connection closed…

Luleo_Primoc
- 75
- 1
- 12
0
votes
1 answer
How to download a file from sourceforge using Powershell?
I am trying to automate updating KeePass in a few computers using powershell, so I'm interested in some sort of way to automatically download the latest release from sourceforge, however I cannot make it work. I've seen a lot of references by…

rovda
- 221
- 2
- 10
0
votes
0 answers
login to a webpage using Powershell 7
I am trying to re-write my code that works with powershell 5.1 but it doesn't work with powershell 7.x
so this is the simplified code that works with PS5.1:
$url = "mysite.com/login"
$r=Invoke-WebRequest -Uri $url -UseDefaultCredentials…

Vital
- 128
- 9
0
votes
1 answer
Loop through CSV to build URL
First try at powershell here - I have a CSV formatted like this.
IPAddress,Username,Password
11.11.34.48,user,pass
I want to use Powershell to loop through each row of the CSV and build a URL which i then invoke.
$path =…

Display Name
- 405
- 6
- 26
0
votes
1 answer
Invoke-RestMethod is taking longer time to get response from Rest API
I have an API http://xx.yy.zz.aaa:8080/api/2.0/GetVersion which I need to hit from Powershell script. When I try hitting it using Invoke-RestMethod it gives me response in 10 minutes.
When I hit same API using Invoke-WebRequest I get response in…

CK__
- 1,252
- 1
- 11
- 25
0
votes
0 answers
Download big file from Google Drive with PowerShell
I created a small PowerShell script for downloading a file with the file size of 1.22 GB, but I only get the source code of the website that informs you about the big file size:
$source =…

JJB
- 15
- 5
0
votes
1 answer
Powershell script run in Command Prompt
I would like to know how to implement Powershell script run into Command Line successfully?
Actually, I tried to run it and show an error message like that:
Basic : The term 'Basic' is not recognized as the name of a cmdlet, function, script file,…

user11343272
- 77
- 1
- 1
- 9