Merge pull request #604 from JamesDodds/main

chore: set a user agent for IWR
pull/615/head
Romain 2024-04-15 23:30:18 +02:00 committed by GitHub
commit 6e76f377a4
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 {
$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
}