mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 14:18:38 +01:00
Improved the script
This commit is contained in:
parent
aebeef06b4
commit
81e0406932
@ -6,11 +6,13 @@
|
|||||||
# Source: github.com/fleschutz/PowerShell
|
# Source: github.com/fleschutz/PowerShell
|
||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
$Cities="Hawaii","Los Angeles","Miami","New York","Rio de Janeiro","Paris","London","Berlin","Cape Town","Dubai","Mumbai","Singapore","Hong Kong","Peking","Tokyo","Sydney"
|
$Cities="Hawaii","Los Angeles","Mexico City","Miami","New York","Rio de Janeiro","Paris","London","Berlin","Cape Town","Dubai","Mumbai","Singapore","Hong Kong","Peking","Tokyo","Sydney"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
write-host "Weather Report World-wide"
|
||||||
|
write-host "========================="
|
||||||
foreach($City in $Cities) {
|
foreach($City in $Cities) {
|
||||||
(Invoke-WebRequest http://wttr.in/${City}?format="%l:+%c+%t+%p+%h+%P+%w +%S ->+%s" -UserAgent "curl" ).Content
|
(Invoke-WebRequest http://wttr.in/${City}?format="* %l:+%c+%t+%p+%h+%P+%w +%S ->+%s" -UserAgent "curl" ).Content
|
||||||
}
|
}
|
||||||
exit 0
|
exit 0
|
||||||
} catch { Write-Error $Error[0] }
|
} catch { Write-Error $Error[0] }
|
||||||
|
Loading…
Reference in New Issue
Block a user