mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 14:18:38 +01:00
Update check-cpu-temp.ps1
This commit is contained in:
parent
eed0b14b0e
commit
7b898d7180
@ -22,18 +22,18 @@ try {
|
||||
$Temp = [math]::round($Temp / 100.0, 1)
|
||||
}
|
||||
|
||||
if ($Temp -gt "80") {
|
||||
write-error "⚠️ $Temp °C CPU temperature is too high!"
|
||||
if ($Temp -gt 80) {
|
||||
"⚠️ $Temp °C CPU temperature: too high!"
|
||||
exit 1
|
||||
} elseif ($Temp -lt "-20") {
|
||||
write-error "⚠️ $Temp °C CPU temperature is too low!"
|
||||
exit 1
|
||||
} elseif ($Temp -gt "50") {
|
||||
"✔️ $Temp °C CPU temperature - quite high"
|
||||
} elseif ($Temp -lt "0") {
|
||||
"✔️ $Temp °C CPU temperature - quite low"
|
||||
} elseif ($Temp -gt 50) {
|
||||
"✔️ $Temp °C CPU temperature: quite high"
|
||||
} elseif ($Temp -gt 0) {
|
||||
"✔️ $Temp °C CPU temperature: good"
|
||||
} elseif ($Temp -gt -20) {
|
||||
"✔️ $Temp °C CPU temperature: quite low"
|
||||
} else {
|
||||
"✔️ $Temp °C CPU temperature - good"
|
||||
"⚠️ $Temp °C CPU temperature: too low!"
|
||||
exit 1
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user