chore: set a user agent for IWR

pull/604/head
James 2024-04-09 18:34:02 +10:00 committed by GitHub
parent 3b8d1f5ff2
commit a3718d6f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ function Test-Network {
} }
try { try {
$ncsiResponse = Invoke-WebRequest -Uri "http://$($ncsiHost)/$($ncsiPath)" -UseBasicParsing $ncsiResponse = Invoke-WebRequest -Uri "http://$($ncsiHost)/$($ncsiPath)" -UseBasicParsing -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::Chrome)
} catch { } catch {
$ncsiResponse = $false $ncsiResponse = $false
} }