Questions tagged [invoke-webrequest]
256 questions
0
votes
1 answer
How to set the "body" part of "Invoke-WebRequest" command
I succeeded with Postman using the below body.(RAW/JSON)
{
"date": ["20200907", "20200907"],
"select": [{
"store_id": "a1129s101",
"factor": [],
"image": [],
"file":["a1129/s101/facc.csv"]
}]
}
But failed when using the…
0
votes
1 answer
Powershell: How can I POST excel (.xlsx) files in a multipart/form-data request?
I'm trying to POST some data to an Express server using Multer as the file upload middleware.
The request includes a few text fields, an API (.yaml) file and an .xlsx file. I can successfully post the .yaml file and the text fields, but not the…

William Mizzi
- 190
- 8
0
votes
1 answer
Download Files with Password in Powershell
I need to download a 51gb zip file from the internet, to open the website you need to enter a password.
I want to do this with a function in PowerShell(PSVersion:5.1.18362.752), but I can't get any further. My function looks like this:
…

Fabian Hofstetter
- 88
- 4
0
votes
2 answers
How can I download a folder from a webserver with authentication?
I need a script that downloads a certain folder and all its subfolders + files to my pc from a webserver. It needs to be in powershell. I searched a bit and found this:
Invoke-WebRequest http://www.example.com/package.zip -OutFile package.zip
I get…

Manuel
- 17
- 4
0
votes
1 answer
Invoke-WebRequest on all Azure app service instances
I want to invoke list of urls for all azure app service instances
Invoke-WebRequest -UseBasicParsing -uri $url -Method Get
with this command it will not work for multiple web app instances
I tried following script it runs and shows recourse id for…

megha
- 621
- 2
- 11
- 36
0
votes
1 answer
PowerShell Invoke-WebRequest: Possible to parse this XML response?
I get a XML response from the REST interface which looks the following. I'd like to only get "OK" back but this hashtag makes it not straight forward.
xmlns #text
http://ucmacs81/OMWebService/ OK
Link to Response
Code I'm using to parse the…

Demo
- 3
- 1
0
votes
0 answers
Powershell WebRequest giving different responses every time
I am using below code to check the url connectivity
$uri = 'https://blue-vrrp.company_name.com'
try
{
$response = Invoke-WebRequest -Uri $uri -UseBasicParsing -TimeoutSec 10 -ErrorAction Stop
# This will only execute if the…

Prashant Shete
- 60
- 10
0
votes
1 answer
How can I automate interacting with Github API via Powershell?
(originally asked "How can I use SSH pub/priv keys to authenticate via Invoke-WebRequest?")
I wanted to automate some housekeeping of my github repos, and (at least for learning) I thought I'd do it with Powershell. Is there a way to provide SSH…

João Ciocca
- 776
- 1
- 10
- 23
0
votes
0 answers
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel. under TLS12
I'm getting error:
Invoke-WebRequest : The request was aborted: Could not create SSL/TLS secure channel.
The command I'm running is okay on other servers.
Most of the answers to this error is about security protocol. While, here is mine:
PS…

Dongkai Yu
- 89
- 3
- 10
0
votes
1 answer
Does Powershell Invoke-WebRequest throws error on download failure?
I wonder if Powershell Invoke-WebRequest will throw client side errors on a download request, such as disk full?
For instance:
# Download recording
try {
$ProgressPreference = 'SilentlyContinue'
$r =…

Riccardo
- 2,054
- 6
- 33
- 51
0
votes
1 answer
Powershell: Import-CSV - How to select specific cells (ie: A5, A10. A15)
I've created a script using invoke-webrequest and filtered the information I need and exported the data to a CSV file, The data is formatted into list view and therefore the data extracted is placed onto a new row down the CSV file (which suits my…

ritch3r
- 11
- 1
0
votes
1 answer
Invoke-WebRequest : {"message":"Missing 'api-version' request header. Please set this header with the a value of a supported API version
I tried to execute an API using Invoke-WebRequest method with powershell in windows, but it return me the message bellow:
Invoke-WebRequest : {"message":"Missing 'api-version' request header. Please set this header with the a value of a supported…

ismail
- 21
- 1
- 3
0
votes
1 answer
Powershell Invoke-WebRequest submit form SAP
I am trying to make a script that checks warranty status on my company's monitors using this URL: http://143.101.250.86/scripts/wgate/zsvz3/!
I understand that looks shady, it's a re-direct from http://warrantycheck.necdisplay.com and it appears to…

nevarDeath
- 137
- 2
- 7
0
votes
0 answers
Utilizing Import-Csv based on user input to pull json blob from website
Scenario:
User has csv with hostnames or one or two hostnames.
User needs to answer multiple options such as "Do you have CSV or Just a Hostname?" and then depending on the answer more input such as "Please enter a file path for CSV" or "Enter a…

johnny_python
- 1
- 2
0
votes
1 answer
PowerShell Invoke-WebRequest trouble with links
I'm trying to create a script which will parse an URL for a specific exe download link and download it. I'm doing this because the download link changes frequently. Below the code:
[Net.ServicePointManager]::SecurityProtocol =…