mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-23 23:29:02 +01:00
Update some scripts
This commit is contained in:
parent
7bce556044
commit
909c8fa0ff
@ -23,15 +23,15 @@ try {
|
||||
}
|
||||
|
||||
if ($Temp -gt 80) {
|
||||
$Reply = "CPU has $Temp °C: too high!"
|
||||
$Reply = "$($Temp)°C CPU temperature, that's too high!"
|
||||
} elseif ($Temp -gt 50) {
|
||||
$Reply = "CPU has $Temp °C: quite high"
|
||||
$Reply = "$($Temp)°C CPU temperature, that's quite high"
|
||||
} elseif ($Temp -gt 0) {
|
||||
$Reply = "CPU has $Temp °C"
|
||||
$Reply = "$(Temp)°C CPU temperature"
|
||||
} elseif ($Temp -gt -20) {
|
||||
$Reply = "CPU has $Temp °C: quite low"
|
||||
$Reply = "$(Temp)°C CPU temperature, that's quite low"
|
||||
} else {
|
||||
$Reply = "CPU has $Temp °C: too low!"
|
||||
$Reply = "$(Temp)°C CPU temperature, that's too low!"
|
||||
}
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
|
@ -31,7 +31,7 @@ try {
|
||||
|
||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||
$Average = [math]::round($Count / $Elapsed, 1)
|
||||
$Reply = "DNS resolution is $Average domains per second"
|
||||
$Reply = "$Average domains per second DNS resolution"
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
|
@ -37,7 +37,7 @@ try {
|
||||
}
|
||||
$Avg = $Avg / $Pings.count
|
||||
|
||||
$Reply = "Average ping is $($Avg)ms ($($Min)ms min, $($Max)ms max)"
|
||||
$Reply = "$($Avg)ms average ping time ($($Min)ms min, $($Max)ms max)"
|
||||
"✔️ $Reply"
|
||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user