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