mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-16 17:51:28 +01:00
Update check-weather.ps1
This commit is contained in:
parent
d9f65fd00d
commit
becc2d5a06
@ -97,7 +97,7 @@ Computer, open `name` settings
|
||||
Computer, check `name`
|
||||
----------------------
|
||||
* let the computer check something.
|
||||
* replace `name` by: "CPU", "date", "DNS", "operating system", "ping", "swap space", "time", "time zone", or "up-time".
|
||||
* replace `name` by: "CPU", "date", "DNS", "operating system", "ping", "swap space", "time", "time zone", "up-time", or "weather".
|
||||
|
||||
|
||||
🔊 Audio
|
||||
|
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Checks the weather for critical values
|
||||
Checks the weather
|
||||
.DESCRIPTION
|
||||
Checks the current weather for critical values.
|
||||
.PARAMETER location
|
||||
@ -52,6 +52,9 @@ try {
|
||||
} else {
|
||||
"WEATHER ALERT: $Result"
|
||||
}
|
||||
$Reply = "$($Temp)°C, $($Precip)mm rain, $($Humidity)% humidity, $($Clouds)% clouds with wind $($WindSpeed)km/h from $WindDir at $Area ($Region)"
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
|
Loading…
Reference in New Issue
Block a user