mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-07-01 05:00:06 +02:00
Update check-iss.ps1
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Checks the ISS
|
Checks the ISS
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script checks the International Space Station (ISS) and report the position by text-to-speech (TTS).
|
This script checks the position of the International Space Station (ISS) and replies by text-to-speech (TTS).
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-iss
|
PS> ./check-iss
|
||||||
.LINK
|
.LINK
|
||||||
@ -14,7 +14,7 @@
|
|||||||
try {
|
try {
|
||||||
$ISS = (Invoke-WebRequest "http://api.open-notify.org/iss-now.json" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
|
$ISS = (Invoke-WebRequest "http://api.open-notify.org/iss-now.json" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json
|
||||||
|
|
||||||
& "$PSScriptRoot/give-reply.ps1" "ISS is at $($ISS.iss_position.longitude)° longitude, $($ISS.iss_position.latitude)° latitude."
|
& "$PSScriptRoot/give-reply.ps1" "The International Space Station is currently at $($ISS.iss_position.longitude)° longitude and $($ISS.iss_position.latitude)° latitude."
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Reference in New Issue
Block a user