Add check-earth.ps1

This commit is contained in:
Markus Fleschutz 2021-12-01 19:40:12 +01:00
parent 678250be48
commit 3871c5ec84
2 changed files with 23 additions and 1 deletions

View File

@ -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", "up-time", or "weather".
* replace `name` by: "CPU", "date", "DNS", "Earth", "operating system", "ping", "swap space", "time", "time zone", "up-time", or "weather".
🔊 Audio

22
Scripts/check-earth.ps1 Executable file
View File

@ -0,0 +1,22 @@
<#
.SYNOPSIS
Checks the earth (fun)
.DESCRIPTION
This script checks the earth and replies by text-to-speech (TTS).
.EXAMPLE
PS> ./check-earth
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
try {
$Reply = "Earth still spins with 1.040mph"
"✔️ $Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}