Azure PowerShell Runbook Error - Internet Explorer engine is not available
Error detail
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.
How to reproduce
- Create an Azure automation account.
- Go to Process Automation -> Runbooks
- Click button Create a runbook
- Choose PowerShell as runbook type and select the runtime version:
- In the content area, input PowerShell script: Invoke-WebRequest "https://google.com/" | Select-Object StatusCode,StatusDescription
- Click Test panel
- Click Run button to run and the following error will show up:
Resolution
The printed out error message already provides the solution: we just need to add parameter -UseBasicParsing to the command:
Invoke-WebRequest "https://google.com/" -UseBasicParsing | Select-Object StatusCode,StatusDescription
The result looks like the following screenshot:
copyright
This page is subject to Site terms.
comment Comments
No comments yet.