Invoke-WebRequest : The response content cannot be parsed because the Internet Explorer…
- User
Invoke-WebRequest : 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. At line:1 char:2
- (Invoke-WebRequest -Uri "https://ipinfo.io/ip").Content
-
+ CategoryInfo : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestComman d
- Assistant
This error occurs because the Internet Explorer engine is not available or its first-launch configuration is not complete. To resolve this error, you can use the UseBasicParsing parameter when invoking the WebRequest.
Here's an updated version of the command:
(Invoke-WebRequest -Uri "https://ipinfo.io/ip" -UseBasicParsing).Content
By adding -UseBasicParsing, PowerShell will use an alternative parsing method instead of relying on Internet Explorer. This should allow you to retrieve the response content successfully.