Questions tagged [invoke-webrequest]
256 questions
0
votes
1 answer
PowerShell, force Internet Explorer to perform its first-launch configuration?
I often hit the dreaded Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again error when using Invoke-WebRequest.
Various pages point out this issue and the use of the UseBasicParsing…

YorSubs
- 3,194
- 7
- 37
- 60
0
votes
1 answer
How to send POST request with Invoke-WebRequest
I tried with below option but it does not work. Can anyone help?
$url='some web page url'
$token='0000000000000'
$headers = @{ 'ContentType' = 'Application/Json'}
$body = @{ "userName"="username"}
Invoke-WebRequest -Method 'post' -Uri $url -Headers…

Roman
- 1
- 2
0
votes
1 answer
How to correctly pass data between two Azure PowerShell Functions
I have two PowerShell Azure functions. The first one collects data and the second one pushes data to an Azure Storage Table. I can see my first function is calling the second function but the second function isn't getting the data. Here is my first…

GreenSaber
- 1,118
- 2
- 26
- 53
0
votes
1 answer
PowerShell, how to handle a page timeout from an Invoke-WebRequest?
I found that a site that I wanted to parse was down today when I went there to download a file.
The code I ran is:
$url = "https://notepad-plus-plus.org/downloads"
$page = Invoke-WebRequest -uri $url -UseBasicParsing
How can I intercept and handle…

YorSubs
- 3,194
- 7
- 37
- 60
0
votes
0 answers
Invoke-WebRequest not working through OneDrive
I have a document residing on OneDrive. The permissions are that anyone with the link can view/edit.
I have written a very short script to download the file and place it onto my desktop. However, once the file is downloaded, I open it to be greeted…

H Smith
- 11
- 1
0
votes
0 answers
Error response when replacing certificate
I have an integration written in Powershell that sends a request to a remote webservice using this line:
$response = Invoke-WebRequest -Uri $uri -Body $xml -Method 'POST' -CertificateThumbprint $CertificateThumbprint
It's been working fine but after…

Luscinia
- 1
- 1
0
votes
0 answers
Converting bash script to Powershell: wget to Invoke-WebRequest
I'm trying to convert a relatively simple bash script to run in Windows. It uses wget to download a file from a site that requires a login name but no password. I have been bashing my head against invoke-webrequest in Powershell for some…

SKaye
- 21
- 5
0
votes
1 answer
MSGraph - Invoke-WebRequest (403) Forbidden
I have a delegate App with Directory.ReadWrite.All permissions and a PS script to auth users over the app. It works when I use GET but I'm getting Forbidden when try PATCH method
Here's the part of that script:
$uri =…

c4os
- 29
- 6
0
votes
0 answers
Downloading a file using PowerShell - Redirected
I have a URL that sends me to a "preparing your download" page, and then triggers a file download.
I need to be able to use PowerShell to script the download of the generated file.
This surely must be possible, but I have no idea how to achieve…
0
votes
0 answers
Invoke-WebRequest can't download properly
I was using Invoke-WebRequest for some time in my script and today first time I got problem with it - once I run script, it starts to download ZIP file and finishes without warnings, but when I am trying to open file, WinRar gives me an error and I…

Роман Рослый
- 39
- 6
0
votes
1 answer
powershell -match 2 different parts of one URL and get them
I want to get to different parts of a URL that I retrieve with PowerShell (https://repo.anaconda.com/archive/Anaconda3-2022.05-Windows-x86_64.exe) the -match returns true, the first match is a date that I can get correct and the second part is the…

atefeh kasiri
- 39
- 5
0
votes
1 answer
Powershell IWR showing bytes read in output how can I suppress these messages?
I have a simple script to test the blocking of palo test sites. How to suppress the bytes read message and have a clean output?
$palotestsites = @("http://urlfiltering.paloaltonetworks.com/test-web-based-email",
…

Zippy
- 455
- 1
- 11
- 25
0
votes
1 answer
Powershell Invoke-RestMethod with body begins from array
I have a web server that responds to a request https://localhost/GetUpdateInfo with a body [{"ipAddress": "10.200.2.55"}]
In postman its Work but in powershell i can`t do this because body begins from array.
When i do exmple code:
$Url =…

Pomidor_83
- 11
- 1
- 3
0
votes
0 answers
Convert curl command into Invoke-ResMethod or Invoke-WebRequest
The following command works in Ubuntu box:
curl -X GET "https://panorama.domain.com/api/?key=LUFRPTxxxxx&type=commit&action=partial&cmd=USERNAME
but it doesn't in the same box…

Alex
- 75
- 7
0
votes
0 answers
Powershell Invoke-WebRequest IMS Path + Credentials
I have some problems passing an IMS url to my powershell command invoke-webrequest
http://ims-bs:7001/si/viewrevision?projectName=/blabla/project.pj&selection=my%5fsoftware%5fv1.1.zip
1.Right now I am stuck at &. I get an error even if I wrap the &…

Lodes
- 21
- 6