Questions tagged [invoke-webrequest]
256 questions
0
votes
1 answer
Use a variable for Invoke-WebRequest download path
I'm trying to write a powershell script that will download an exe from a specified URL (passed through as a parameter at the time of calling the script)
The code I…

kurtis452
- 3
- 2
0
votes
1 answer
Invoke-WebReqeust - XML String needs to be stored in a form field called REQUEST and should be sent to our servers via HTTP POST method
Stuck following some poor documentation. Attempting to connect to a vendors API to pull orders into my own DB. The vendor has only one line and example (not even a proper url that I am still attempting to get).
Documentation =
XML String needs to…

Brian Wiest
- 1
- 1
0
votes
0 answers
function in powershell scheduled task does not work
I can run this function interactively just fine. When I put it in a scheduled task it fails. It normally returns "OK" and I run with the logic from there. The $RequestMessage contains 2 variables for username and password, which are declared at the…

hooray4rob
- 11
- 3
0
votes
1 answer
Powershell Core Script only running inside pwsh command
I have developed a Module "XPTO.psm1" that I created my custom class:
class XPTO {
[string]$baseurl
[string]$fileToken
$session = [Microsoft.PowerShell.Commands.WebRequestSession]::new()
In my main…

Renato Melão
- 1
- 1
0
votes
1 answer
Invoke-WebRequest with a random token + forms unavailable
Website I am attempting to do this on: https://www.netvendor.net/login
I am trying to login to the website automatically and kick off a script to create users in bulk for us.
If you run an Invoke-WebRequest on this page, it returns information, but…

Brendan Lovett
- 33
- 5
0
votes
1 answer
how to parse JSON response using power shell?
I'm looking for parsing JSON respoonse with powershell ruuning on azure runbook.,
The following is my code.
$servicePrincipalConnection=Get-AutomationConnection -Name "AzureRunAsConnection"
Connect-AzAccount `
-ServicePrincipal `
…

saran k
- 307
- 2
- 14
0
votes
0 answers
Invoke-WebRequest : The remote server returned an error: (500) Internal Server Error
Invoke-WebRequest returns an invalid operation error
>powershell Invoke-WebRequest -Uri https://webhook.site/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -Method POST -InFile HappyMeal
above command returned below error
Invoke-WebRequest : The remote…

lenzfliker
- 35
- 1
- 7
0
votes
0 answers
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send via proxy
Error:
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send
via : proxy
powershell version 4.0, the same request works with later version of powershell
Tried to invoke web request
$headers = @{…

vasanth kumar
- 1
- 1
0
votes
1 answer
Invoke-Webrequest click a button and continue with a session variable
I'm trying to log into my printers to grab logs from them and parse them with powershell.
The logon box isn't a FORM, it's an unordered list containing INPUT textboxes.
So I have managed to select the PIN textbox and give it the correct value.
I…

Rakha
- 1,874
- 3
- 26
- 60
0
votes
0 answers
Is there a way for scraping a specific table row or table cell with powershell?
I'm coding a web-scraper with PowerShell and want to select a specific value in a table or the whole row.
What I've managed already is to print out my values but it selects the column names and the values which is not desired. This could be because…

Ahune ajé o ahe
- 121
- 9
0
votes
2 answers
How to download a file accepting license using powershell
I am trying to download package from the below link using powershell.
https://www.tenable.com/downloads/nessus-agents
i do not have direct link for these package also when i click on download it ask to agree. I was able to do it on Linux using…

Mandy
- 33
- 1
- 3
0
votes
1 answer
Unable to invoke web-request for script called in scheduled task for service account
We have a Powershell script which downloads some zip files from a website and we have called the script in a scheduled task.
The problem is we are not getting the zip files even after the scheduled task is finished successfully. We are using a…

Mitesh Agrawal
- 67
- 3
- 12
0
votes
1 answer
Selecting the next line of string along with the string that matches my search
Trying to user PowerShell to parse and scrape a webpage, a type of s/w inventory mgmt site we have, with below code
$test = Invoke-WebRequest -UseBasicParsing -Uri https://testuser -UseDefaultCredentials
$test.ToString() -split "[`r`n]" |
…

Oxycash
- 167
- 12
0
votes
0 answers
trying to convert simple curl command to invoke-webrequest but not working
I have a very simple curl command, this works for me (not using basic auth- the service just expects the token to be in URL):
curl -v -X POST https://Dkdjhf928hfDJFSDFJSK@sonarcloud.io/api/projects/create -d…

red888
- 27,709
- 55
- 204
- 392
0
votes
1 answer
What does Credential-Option of Invoke-WebRequest add to httpRequest?
Question
I think Credential Option would add something to requestHeader, but it looks like nothing was added.
Does Credential Option change other part of httpRequest?
Environment
windows10
PowerShell 5.1.17134.765
analyzed request with…

pico
- 1