You might encounter the titular error message when executing curl
or Invoke-WebRequest
commands in PowerShell console. It means that by default, Invoke-WebRequest
is using the Internet Explorer engine to parse the response content, which may not be functioning properly.
To resolve this issue, you can use the Invoke-WebRequest
command with the -UseBasicParsing
parameter to use the basic parser for handling the response content. The basic parser does not rely on the Internet Explorer engine.
Here’s an example:
Invoke-WebRequest -Uri "http://ifconfig.net/country" -UseBasicParsing
By adding the -UseBasicParsing
parameter, Invoke-WebRequest
will utilize the basic parser to handle the response content, bypassing the reliance on the Internet Explorer engine. Make sure to include the -UseBasicParsing
parameter in all instances of the Invoke-WebRequest
command to ensure it works properly.
Leave a Reply