Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available

Posted by

Yesterday I was facing this error when running a SMA Runbook with the invoke-webrequest cmdlet. For troubleshooting I had to enable SMA script logging for this runbook so I was able to see wats going wrong. The error says you must run the “getting started setup” of internet explorer for the service account which is running the scripts.

 

This is not ideally when you run this script on multiple servers. Now there are 2 options available to ignore this stupid error:

1. Enable the Group policy object (GPO) for Prevent running first run wizard. This setting is in “Computer configuration -> Policies -> Administrative templates -> Windows Components -> Internet Explorer”. Set the “Prevent running first run wizard” to enabled.

2. Run the Invoke-webrequest with the –UseBasicParsing CMDlet.

 

 

Leave a Reply

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