The Invoke-WebRequest cmdlet is a powerful tool in PowerShell for making HTTP and HTTPS requests. However, it can sometimes produce an error indicating that the Internet Explorer engine is not available or its first-launch configuration is incomplete. This issue can be resolved by using the -UseBasicParsing parameter.

Error Message

The typical error message you might encounter is:

The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer’s first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again.

Solution

To resolve this error, add the -UseBasicParsing parameter to your Invoke-WebRequest command. This parameter tells PowerShell to use basic parsing instead of relying on Internet Explorer.

Example Script

Here is an example of how to use Invoke-WebRequest with the -UseBasicParsing parameter:

# Example of using Invoke-WebRequest with -UseBasicParsing
$Query = Invoke-WebRequest 'https://www.leblogosd.wuibaille.fr' -UseBasicParsing

0 Comments

Leave a Reply

Avatar placeholder

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.