Questions tagged [invoke-webrequest]

256 questions
0
votes
0 answers

Data is passed as null in invoke-webrequest put method

When I send input to PowerShell put request it throws an internal error. This is the response I got: "message": "Internal Error" "status": "failed" The code snippet is as follows: $input_data=@" { "share": { "users": [ { …
0
votes
0 answers

'Invoke-WebRequest -Body Get-Content' breaking JSON

I am trying to send the content of a JSON file to an API using Invoke-WebRequest. I have validated the JSON file and it's healthy. I can also send the JSON file successfully using a REST Client (Postman and Insomnia), so I know the JSON data and API…
Arbiter
  • 450
  • 5
  • 26
0
votes
0 answers

not able to pass date as parameter to a uri in powershell

I'm trying to get the usage details for an azure subscription in JSON format through powershell and rest API(https://consumption.azure.com/v3/enrollments/{enrollmentNumber}/usagedetailsbycustomdate?startTime=2017-01-01&endTime=2017-01-10) My code is…
0
votes
2 answers

Problems when calling an API

We have two APIs that does a POST and GET requests. Both of them used to work perfectly fine but the API that does POST started giving an error: Invoke-WebRequest : The underlying connection was: An unexpected error occurred on a receive.` I have…
Sid
  • 1
  • 1
0
votes
1 answer

How to "click" element from resulting object Invoke-WebRequest command

I am trying to automate data collection from the vmware hardware compatibility list, focused around VSAN products. They have a searchable page, and once you put in your request, you get a list of results. They also have a button that allows "export…
IonutN
  • 91
  • 1
  • 10
0
votes
2 answers

Check content from invoke-webrequest for string

I've got the following bit of powershell checking a version file on the back of one of my apps. invoke-webrequest "https://mypi.mydomain/version.htm" | Select-Object -Property Content This returns a version number and the environment…
John Fox
  • 747
  • 1
  • 13
  • 28
0
votes
0 answers

What is preventing some of the content from an Invoke-WebRequest showing?

I am trying to get some acsii art characters directly from a webpage. You can navigate to the page using the following URL. http://patorjk.com/software/taag/#p=display&f=Acrobatic&t=A If you go to that page you will see a rendering of the character…
Matt
  • 45,022
  • 8
  • 78
  • 119
0
votes
1 answer

Invoke-WebRequest not uploading file to server

I am trying to HTTP push files to a server from Powershell on my Windows machine. The server is using a PHP script (cut down from the w3schools version here: https://www.w3schools.com/php/php_file_upload.asp):
0
votes
1 answer

Get recommended videos with powershell on Youtube

When I open any video with powershell it turns out the recommended videos on the right side. I tried to solve the problem in two ways.But neither of them gives the results I want. way 1 $URI =…
Mustafa
  • 977
  • 3
  • 12
  • 25
0
votes
3 answers

trying to make an Rest call (PUT) with powershell

I am trying to change the course code via the canvas api. I can get it to work in bash with the example the give curl -X PUT -H 'Authorization: Bearer w3KhVblthisisnottoken5LmhlnUorFM8NJMh0' \ https://school.test.instructure.com/api/v1/courses/9066…
Franco Pettigrosso
  • 4,056
  • 2
  • 20
  • 32
0
votes
1 answer

How to check status of list of Websites / URLs? (Using Power-Shell script)

I want to take the http status of multiple URL at once to prepare a report. How to acheive it using powershell?
-1
votes
1 answer

run Invoke-WebRequest in powershell generate 403 error

I want to use the powershell to login the website: https://uk.blsspainvisa.com/visa4spain/login, I use my Chrome can open the website, while when I use the Invoke-WebRequest to login, I get the 403 error. Any one can help me? Thanks. enter image…
why_boy
  • 1
  • 1
-1
votes
1 answer

PowerShell Invoke-Webrequest login Fail

We have this site that i want to log in and do a bit of automation that would get me info that I want. first you need to like place these details below in this site http://ipamtool.*****.com/menandmice/Login.htm Host: Username: Password: and then…
-1
votes
1 answer

Getting the current logged in web session cookie using powershell

I am currently logged in with my browser and wanted to get the current cookie of that session. but when i use this code it creates another session id for that request only. NOT for the currently logged in session in my browser. $url =…
xoox
  • 13
  • 1
  • 7
-3
votes
1 answer

Is there any function to fetch real-time downloaded size during the downloading process without using any buffer operation in powershell

#Progress bar script of PowerShell to download Kubescape $fullurl='https://github.com/kubescape/kubescape/releases/download/v2.0.168/kubescape-windows-latest' $Total_size=((Invoke-WebRequest -Uri $fullurl -Method…
1 2 3
16
17