Skip to content

General-weather

Lists the current weather forecast

param([string]$GeoLocation = "") # empty means determine automatically

try {
	(Invoke-WebRequest http://wttr.in/$GeoLocation -userAgent "curl" -useBasicParsing).Content
	exit 0 # success
} catch {
	"?? ERROR: $($Error[0]) (script line $($_.InvocationInfo.ScriptLineNumber))"
	exit 1
}

Specifies the geographic location to use

An interactive directory of PowerShell scripts.