PowerShell/Scripts/check-earth.ps1

23 lines
501 B
PowerShell
Raw Normal View History

2021-12-01 19:40:12 +01:00
<#
.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 {
2021-12-01 19:47:14 +01:00
$Reply = "Earth still spins with 1040mph."
2021-12-01 19:40:12 +01:00
"✔️ $Reply"
& "$PSScriptRoot/speak-english.ps1" "$Reply"
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
exit 1
}