mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-25 08:09:17 +01:00
Update some scripts
This commit is contained in:
parent
7bce556044
commit
909c8fa0ff
@ -23,15 +23,15 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($Temp -gt 80) {
|
if ($Temp -gt 80) {
|
||||||
$Reply = "CPU has $Temp °C: too high!"
|
$Reply = "$($Temp)°C CPU temperature, that's too high!"
|
||||||
} elseif ($Temp -gt 50) {
|
} elseif ($Temp -gt 50) {
|
||||||
$Reply = "CPU has $Temp °C: quite high"
|
$Reply = "$($Temp)°C CPU temperature, that's quite high"
|
||||||
} elseif ($Temp -gt 0) {
|
} elseif ($Temp -gt 0) {
|
||||||
$Reply = "CPU has $Temp °C"
|
$Reply = "$(Temp)°C CPU temperature"
|
||||||
} elseif ($Temp -gt -20) {
|
} elseif ($Temp -gt -20) {
|
||||||
$Reply = "CPU has $Temp °C: quite low"
|
$Reply = "$(Temp)°C CPU temperature, that's quite low"
|
||||||
} else {
|
} else {
|
||||||
$Reply = "CPU has $Temp °C: too low!"
|
$Reply = "$(Temp)°C CPU temperature, that's too low!"
|
||||||
}
|
}
|
||||||
"✔️ $Reply"
|
"✔️ $Reply"
|
||||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
|
@ -31,7 +31,7 @@ try {
|
|||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
$Average = [math]::round($Count / $Elapsed, 1)
|
$Average = [math]::round($Count / $Elapsed, 1)
|
||||||
$Reply = "DNS resolution is $Average domains per second"
|
$Reply = "$Average domains per second DNS resolution"
|
||||||
"✔️ $Reply"
|
"✔️ $Reply"
|
||||||
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
@ -37,7 +37,7 @@ try {
|
|||||||
}
|
}
|
||||||
$Avg = $Avg / $Pings.count
|
$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"
|
"✔️ $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