OSDeploy / OSD

OSD Shared Functions
MIT License
130 stars 54 forks source link

Block-NoInternet function is providing false results #132

Closed gwblok closed 2 months ago

gwblok commented 3 months ago

Test-WebConnection -Uri 'microsoft.com' is reporting false when it should be true. Unsure what changed.

image

This has broken some functionality in OSD that downloads things from the internet.

gwblok commented 3 months ago

I'm updating 'microsoft.com' to 'google.com' as a quick fix... plan to incorporate a better plan to loop through URLs for tests.

gwblok commented 3 months ago

Fixed in latest module. 24.3.27.1

Still plans to make more robust.

gwblok commented 3 months ago

Added a check for 4 different sites, it will check in order, the first one that responds back as TRUE, it's all good. If it fails, it continues through all 4 before it says it's "FALSE" This does add a little delay if there is no interent, but hey, if there is no interent when this function is called, there are bigger issues.

$TestURLs = @('google.com','github.com','nvidia.com','apple.com')

@OSDeploy, hoping you can double check my code logic on that one.

gwblok commented 2 months ago

This is now live, closing issue