mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-18 08:30:00 +02:00
Add '-useBasicParsing'
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
param([string]$GeoLocation = "") # empty means determine automatically
|
||||
|
||||
try {
|
||||
(invoke-webRequest http://wttr.in/$GeoLocation -UserAgent "curl" ).Content
|
||||
(Invoke-WebRequest http://wttr.in/$GeoLocation -userAgent "curl" -useBasicParsing).Content
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
|
Reference in New Issue
Block a user