mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-08 09:20:19 +02:00
Rename to write-time.ps1
This commit is contained in:
parent
f14196edf8
commit
47c2254882
@ -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
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user