Rename to write-time.ps1

This commit is contained in:
Markus Fleschutz 2022-09-10 14:16:14 +02:00
parent f14196edf8
commit 47c2254882

View File

@ -1,10 +1,10 @@
<# <#
.SYNOPSIS .SYNOPSIS
Determines the current time Writes the current time
.DESCRIPTION .DESCRIPTION
This PowerShell script determines and speaks the current time by text-to-speech (TTS). This PowerShell script determines and writes the current time.
.EXAMPLE .EXAMPLE
PS> ./check-time PS> ./write-time
.LINK .LINK
https://github.com/fleschutz/PowerShell https://github.com/fleschutz/PowerShell
.NOTES .NOTES
@ -12,12 +12,11 @@
#> #>
try { try {
[system.threading.thread]::currentThread.currentCulture=[system.globalization.cultureInfo]"en-US" [system.threading.thread]::currentThread.currentCulture = [system.globalization.cultureInfo]"en-US"
$CurrentTime = $((Get-Date).ToShortTimeString()) $CurrentTime = $((Get-Date).ToShortTimeString())
"🕒$CurrentTime"
& "$PSScriptRoot/give-reply.ps1" "It's $CurrentTime"
exit 0 # success exit 0 # success
} catch { } catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1 exit 1
} }