Before submitting your issue for the Jenkins project, please take a moment to provide the following details:
[ ] Version of PowerShell you're using 5.1
[ ] PowerShell host you're using (eg. Console Host, ISE, Visual Studio) Console
[ ] Operating system you're running Windows Server 2019 and 2022
[ ] Version of Jenkins PowerShell Module you're using (use Get-Module -Name Jenkins) 1.2.1
When calling Get-JenkinsCrumb on server OS with IE disabled, Invoke-WebRequest fails with an 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.'
Adding -UseBasicParsing to the parameters resolved this issue
I was unable to test further due to Issue #3 and crumb, but UseBasicParsing would be needed anywhere Invoke-WebRequest or RestMethod is used. A quick search through the module, I see that it is included in the parameter set in some invocations but not all.
Hi @JesseHermes - good catch. Yes, we should add -UseBasicParsing parameter to all IWR calls. Happy to take a PR or I'll get to it when I can (long backlog :cry:).
Issue
Before submitting your issue for the Jenkins project, please take a moment to provide the following details:
Get-Module -Name Jenkins
) 1.2.1When calling Get-JenkinsCrumb on server OS with IE disabled, Invoke-WebRequest fails with an 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.'
Adding -UseBasicParsing to the parameters resolved this issue
I was unable to test further due to Issue #3 and crumb, but UseBasicParsing would be needed anywhere Invoke-WebRequest or RestMethod is used. A quick search through the module, I see that it is included in the parameter set in some invocations but not all.