mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-30 06:58:49 +02:00
Improved check-cpu-temp.ps1
This commit is contained in:
parent
fae4bad30f
commit
f8b4a31a5e
@ -16,15 +16,15 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($Temp -gt "80") {
|
if ($Temp -gt "80") {
|
||||||
write-error "CPU has $Temp °C - too high!"
|
write-error "FAIL - $Temp °C CPU temperature is too high!"
|
||||||
exit 1
|
exit 1
|
||||||
} elseif ($Temp -lt "-20") {
|
} elseif ($Temp -lt "-20") {
|
||||||
write-error "CPU has $Temp °C - too low!"
|
write-error "FAIL - $Temp °C CPU temperature is too low!"
|
||||||
exit 1
|
exit 1
|
||||||
} elseif ($Temp -gt "50") {
|
} elseif ($Temp -gt "50") {
|
||||||
write-warning "CPU has $Temp °C - quite high"
|
write-warning "$Temp °C CPU temperature is quite high"
|
||||||
} elseif ($Temp -lt "0") {
|
} elseif ($Temp -lt "0") {
|
||||||
write-warning "CPU has $Temp °C - quite low"
|
write-warning "$Temp °C CPU temperature is quite low"
|
||||||
} else {
|
} else {
|
||||||
write-host -foregroundColor green "OK - $Temp °C CPU temperature"
|
write-host -foregroundColor green "OK - $Temp °C CPU temperature"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user