Open zsirkin opened 5 years ago
In case you haven't done this in the latest update (I have yet to update mine), I recommend updating your 2 invoke-webrequest lines to include "-UseBasicParsing" so that we don't have to expect that the logged in user has ever opened IE: ORIGINAL:
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers ` -ContentType $contentType -Verbose:$oktaVerbose -Body $postData -ErrorVariable evar } else { $request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers ` -ContentType $contentType -Verbose:$oktaVerbose -ErrorVariable evar
NEW:
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers ` -ContentType $contentType -Verbose:$oktaVerbose -Body $postData -ErrorVariable evar -UseBasicParsing } else { $request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers ` -ContentType $contentType -Verbose:$oktaVerbose -ErrorVariable evar -UseBasicParsing
The idea came from here after we had issues with it not working for users on servers... https://github.com/PowerShell/Polaris/issues/90
As always, thanks for everything!!
Zach
thanks for this fix. I imagine this will effect more and more people attempting to use this module.
In case you haven't done this in the latest update (I have yet to update mine), I recommend updating your 2 invoke-webrequest lines to include "-UseBasicParsing" so that we don't have to expect that the logged in user has ever opened IE: ORIGINAL:
NEW:
The idea came from here after we had issues with it not working for users on servers... https://github.com/PowerShell/Polaris/issues/90
As always, thanks for everything!!
Zach