From a3718d6f09c593942c2a7165c0fae332d11e29d1 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 9 Apr 2024 18:34:02 +1000 Subject: [PATCH] chore: set a user agent for IWR --- Sources/WAU/Winget-AutoUpdate/functions/Test-Network.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/WAU/Winget-AutoUpdate/functions/Test-Network.ps1 b/Sources/WAU/Winget-AutoUpdate/functions/Test-Network.ps1 index 10e3dc1..04a9036 100644 --- a/Sources/WAU/Winget-AutoUpdate/functions/Test-Network.ps1 +++ b/Sources/WAU/Winget-AutoUpdate/functions/Test-Network.ps1 @@ -20,7 +20,7 @@ function Test-Network { } try { - $ncsiResponse = Invoke-WebRequest -Uri "http://$($ncsiHost)/$($ncsiPath)" -UseBasicParsing + $ncsiResponse = Invoke-WebRequest -Uri "http://$($ncsiHost)/$($ncsiPath)" -UseBasicParsing -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::Chrome) } catch { $ncsiResponse = $false }