Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UseBasicParsing for PowerShell version 5 (RunOn = Azure) #141

Closed
mojoaar opened this issue Jun 24, 2021 · 1 comment · Fixed by #142
Closed

UseBasicParsing for PowerShell version 5 (RunOn = Azure) #141

mojoaar opened this issue Jun 24, 2021 · 1 comment · Fixed by #142
Assignees
Labels

Comments

@mojoaar
Copy link

mojoaar commented Jun 24, 2021

Hi.

Trying to do a simple Get-ServiceNow command (RunOn = Azure). When running local I have no problems (PS version 7). When running on AA I get the error: "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. "

If I look at Invoke-ServiceNowRestMethod.ps1 I see that it does not include the -UseBasicParsing parameter.

Would it be an idea to workaround this issue by checking the PS version where the code is running?

PS version: above 6 = dont use -UseBasicParsing parameter
PS version: 5 and bellow = use -UseBasicParsing parameter

Did a simple (RunOn = Azure) call as a test to confirm: Invoke-WebRequest -Uri 'https://api.chucknorris.io/jokes/random' -UseBasicParsing

Any ideas, comments - am I missing something maybe?

@gdbarron
Copy link
Collaborator

Hi @mojoaar. I don't think you're missing anything. Some quick research shows this not only will solve your issue, but shouldn't harm anything else either. Also, they kept the parameter for >=v6, its been deprecated and just doesn't do anything as basic parsing is now the default. Let me do some testing with it, but I'm sure it'll be fine.

I took over the project a few months ago and was wondering if anyone was actually using the AA side of it. I now have my answer 😄

@gdbarron gdbarron self-assigned this Jun 25, 2021
@gdbarron gdbarron added the bug label Jun 25, 2021
gdbarron added a commit that referenced this issue Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants