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

Test-WebConnection Returns False Even When Connected To Network #81

Open
PyKestrel opened this issue Oct 18, 2023 · 1 comment
Open

Comments

@PyKestrel
Copy link

The Error
After wiping the disk, the script begins to test the web connectivity and returns false causing the script to fail. Upon further investigation I was able to trace it back to the Test-WebConnection Uri, that being google.com.

If I invoke a web request like such:
Invoke-WebRequest -Method 'Head' -Uri 'google.com' -UseBasicParsing

It would return an error in which it stated that it was forbidden under my policy to reach this site. This is most likely because we are enforcing HTTPS somewhere along the way.

Work Around
To work around this, I edited the Test-WebConnection function and changed the Uri to 'https://google.com' and that was successful.

Is it possible to change the function so that it checks for both http and https connections to avoid this potential error in the future?

This was all tested on a Dell OptiPlex 5090, I can send some screenshot of the exact errors should you need them.

@AkosBakos
Copy link
Collaborator

What about SSL Inspection config on your firewall?
Could it be possible to check this behaviour in your home network if it's still the same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants