TheJumpCloud / support

Public scripts and examples for managing JumpCloud managed systems and service endpoints
267 stars 154 forks source link

JCAPI.ps1 fails with parsing error because Internet Explorer engine is not available #108

Closed zaro0508 closed 5 years ago

zaro0508 commented 5 years ago

We run a powershell script on our AWS windows 2019 server (from ami-02d43577e47e684d9) to give a jumpcloud user access to a jumpcloud system. We execute the script at instance boot up and we are getting an error in JCAPI.ps1 "WebRequest : The response content cannot be parsed because the Internet Explorer engine is not available". It looks the problem is the Invoke-WebRequest in that module needs the 'UseBasicParsing' flag.

the associate-jc-system.ps1 script is here: https://github.com/Sage-Bionetworks/infra-utils/blob/master/aws/associate-jc-system.ps1

------------ Error Message ------------ Powershell.exe Set-ExecutionPolicy Bypass -Scope Process -Force;Powershell.exe C:\scripts\associate-jc-system.ps1 -JcServiceApiKey XXXXXXXXXXXXXXXX -JcSystemsGroupId abcde1231f24751f06019c9d -OwnerEmail kevin.durant@warriors.org 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 C:\Program Files\WindowsPowerShell\Modules\JumpCloud\1.12.0\Private\NestedFunctions\Invoke-JCApi.ps1:115 char:38

ghost commented 5 years ago

Thanks for reporting the issue and your fix is correct. We are planning on deploying a minor update early next week which will contain the fix for this.

scottd3v commented 5 years ago

The issue has been resolved with the release of 1.12.1. Please let us know if you run into any more issues.