mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 01:48:20 +02: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)
|
$Temp = [math]::round($Temp / 100.0, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Temp -gt "80") {
|
if ($Temp -gt 80) {
|
||||||
write-error "⚠️ $Temp °C CPU temperature is too high!"
|
"⚠️ $Temp °C CPU temperature: too high!"
|
||||||
exit 1
|
exit 1
|
||||||
} elseif ($Temp -lt "-20") {
|
} elseif ($Temp -gt 50) {
|
||||||
write-error "⚠️ $Temp °C CPU temperature is too low!"
|
"✔️ $Temp °C CPU temperature: quite high"
|
||||||
exit 1
|
} elseif ($Temp -gt 0) {
|
||||||
} elseif ($Temp -gt "50") {
|
"✔️ $Temp °C CPU temperature: good"
|
||||||
"✔️ $Temp °C CPU temperature - quite high"
|
} elseif ($Temp -gt -20) {
|
||||||
} elseif ($Temp -lt "0") {
|
"✔️ $Temp °C CPU temperature: quite low"
|
||||||
"✔️ $Temp °C CPU temperature - quite low"
|
|
||||||
} else {
|
} else {
|
||||||
"✔️ $Temp °C CPU temperature - good"
|
"⚠️ $Temp °C CPU temperature: too low!"
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user