How to Deal with “无法分析响应内容,因为 Internet Explorer 引擎不可用,或者 Internet Explorer 的首次启动配置不完整” Error

You might encounter the titular error message when executing curlor Invoke-WebRequestcommands 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.

 


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *