Invoke-WebRequest "host unknown" in powershell version 7.2, 5.1 did work

385 views Asked by At

I use a script in our intranet with ps 5.1:

Invoke-WebRequest -UseDefaultCredentials -Uri http://intra.mycompany.com/mysite

updating to powershell 7.2 it stopped working

Invoke-WebRequest -UseDefaultCredentials -AllowUnencryptedAuthentication -Uri http://intra.mycompany.com/mysite

It says "Invoke-WebRequest: The given host is unknown." How can I make this http-request work in ps 7?

0

There are 0 answers