Questions tagged [invoke-webrequest]

256 questions
1
vote
1 answer

Windows 7 with .NET 4.8 installed and using tls1.2 still getting 'Could not create SSL/TLS secure channel' on certain websites - but not all websites

I know this topic has been covered comprehensively on SO and several other forums by now. I'm hoping someone can shed some light on my issue. TL;DR: I can get this script to see if a URL is valid when the server uses Tls1.2, but not a URL where…
Paul π
  • 133
  • 11
1
vote
1 answer

I want to get the version number of Power-BI from the website and the -match is true but I can not see the version number, how I can see the number?

$Uri = 'https://aka.ms/pbiSingleInstaller' $web = Invoke-WebRequest -Uri $uri $url=$web.Links |Where-Object href -Like "*confirmation*" | Select-Object -expand href ( $downloadurlid = "https://www.microsoft.com/en-us/download/" + $url ) …
1
vote
1 answer

Parse HTML to export cell content of specific table

There's a HTML file which is exported to a variable using 'Invoke-WebRequest' from where I'd like to export content from a specific table. $Result = Invoke-WebRequest 'https://www.dailyfaceoff.com/teams/anaheim-ducks/line-combinations' Unfortunately…
1
vote
1 answer

PowerShell, download a file if the filename has changed?

I've been reading the answers here on downloading files under certain conditions, and everything there is clear, but I have a bit of a problem with the place I am trying to download from. I would like to download from the button beside .zip in the…
YorSubs
  • 3,194
  • 7
  • 37
  • 60
1
vote
1 answer

Powershell Invoke-Webrequest for page login when no forms are present

I saw this post without a solution but my problem is similar. I'm trying to automate some information lookup on my own login page for a service I'm using. When I run the following command it doesn't give me anything for .Forms $Webpage =…
Tanaka Saito
  • 943
  • 1
  • 17
  • 40
1
vote
1 answer

Powershell: web-request with relevant info

I would like to print text from webpage https://cicero.blazni.cz/lipsum.php . This page generates words when its loaded. It works fine if the page is loaded in browser, powershell prints the sentence which is changed every 5s. If I close browser,…
Lucie
  • 185
  • 10
1
vote
0 answers

Using Powershell to "Discover" devices with a Web interface

I am trying to develop a PowerShell tool to gather "Discovery" information about devices on our network. We already have a commercial discovery tool but in quite a lot of cases, it is not giving us very much information. The idea is to probe a…
1
vote
0 answers

How to download images through Power Shell from all pages of the website

I was able to download images from this web page. But how do you get images from the entire website to download? $folder = 'c:\drawings' $exists = Test-Path -Path $folder if (!$exists) { $null = New-Item -Path $folder -ItemType Directory } explorer…
1
vote
0 answers

How to invoke web request for Single Sign On (SSO) authentication via powershell

I was trying to download a file from an URL which required users login with SingleSignOn (SSO). The URL is a website using SAML authentication method. Is there anyway I can do in the script to authenticate the users or anything else I could do? The…
1
vote
1 answer

Uploading a text file to discord using webhook

I looked through and tested a few examples I saw online with no success. From what I understand it should look something like the code below: $hookUrl = 'https://discord.com/api/webhooks/XXXXXXXXXXXXXXXXXXXX' $Body = @{ 'username' =…
I am Jakoby
  • 577
  • 4
  • 19
1
vote
1 answer

Powershell Invoke-Webrequest encodes filename of uploaded file to Base64 when it contains german umlaut

when I'm uploading a file using Powershell Invoke-Webrequest, then the filename gets encoded to base64 when it contains a german umlaut, otherwise it stays in the original encoding. Here's an example: $path = "C:\test\Peter…
Tobias
  • 11
  • 2
1
vote
1 answer

powershell invoke-webrequest does not work but invoke-restmethod works

I want to get the content of a web page and when I use $web = Invoke-RestMethod -Uri "https://inkscape.org/" I will get the content but when I use $web = Invoke-WebRequest -Uri "https://inkscape.org/" I won't get anything why it happens?? and what…
1
vote
2 answers

How to get value of a link from a website with powershell?

I want to get download URL of the last version of GIMP from it's site ,I wrote a script but it returns the link name I do not know how to get the value $web = Invoke-WebRequest -Uri "https://download.gimp.org/pub/gimp/v2.10/windows/" $web.Links |…
1
vote
1 answer

Invoke-WebRequest in PowerShell causes a warning popup "a script on this page is causing your web browser to run slowly"

When trying to run an Invoke-WebRequest in PowerShell, it takes absolutely ages to do anything and then I get a message saying "A script on this page is causing your web browser to run slowly". I wouldn't mind too much, but this is for a auto…
Blind Trevor
  • 746
  • 2
  • 9
  • 28
1
vote
1 answer

How can I make this Invoke-Webrequest ask for all the pages?

The command below loops through a file which contains activity ID numbers, and sends a request that checks what members attended this activity. It's a PowerShell command from within a batch file. Powershell "Get-Content .\idsonly.txt |…
Ne Mo
  • 198
  • 4
  • 18