mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-14 20:14:00 +01:00
Update check-uptime.ps1
This commit is contained in:
parent
fdc9965b30
commit
7a7a92ecc4
@ -24,21 +24,23 @@ try {
|
||||
$Hours = $Uptime.Hours
|
||||
$Minutes = $Uptime.Minutes
|
||||
|
||||
$Reply = "I'm up for "
|
||||
if ($Days -eq "1") {
|
||||
$Reply = "Up for 1 day, "
|
||||
} else {
|
||||
$Reply = "Up for $Days days, "
|
||||
$Reply += "1 day, "
|
||||
} elseif ($Days -ne "0") {
|
||||
$Reply += "$Days days, "
|
||||
}
|
||||
if ($Hours -eq "1") {
|
||||
$Reply += "1 hour "
|
||||
} else {
|
||||
} elseif ($Hours -ne "0") {
|
||||
$Reply += "$Hours hours "
|
||||
}
|
||||
if ($Minutes -eq "1") {
|
||||
$Reply += "and 1 minute."
|
||||
} else {
|
||||
$Reply += "and $Minutes minutes."
|
||||
$Reply += "and 1 minute"
|
||||
} elseif ($Minutes -ne "0") {
|
||||
$Reply += "and $Minutes minutes"
|
||||
}
|
||||
$Reply += "."
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user