Replacement for Invoke-WebRequest before IE retirement in June 2022?

4.2k Views Asked by At

I've inherited a lot of scripts that rely on Invoke-WebRequest and am aware that this commandlet requires IE to run.

Is there a way to configure Invoke-WebRequest so that it uses Edge instead?

Considering that Internet Explorer 11 desktop application will be retired and go out of support on June 15, 2022; I'd imagine that MS would have some drop-in replacement for the Invoke-WebRequest command that would allow PowerShell scripts using it to continue to function after IE11's retirement.

1

There are 1 best solutions below

0
romo On

PowerShell 5.1 -UseBasicParsing Indicates that the cmdlet uses the response object for HTML content without Document Object Model (DOM) parsing. This parameter is required when Internet Explorer is not installed on the computers, such as on a Server Core installation of a Windows Server operating system.

PowerShell 7.2 -UseBasicParsing This parameter has been deprecated. Beginning with PowerShell 6.0.0, all Web requests use basic parsing only. This parameter is included for backwards compatibility only and any use of it has no effect on the operation of the cmdlet.