mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-24 17:03:45 +01:00
Updated check-cpu.ps1 and check-smart-devices.ps1
This commit is contained in:
parent
fc66df1797
commit
6659468d18
@ -72,6 +72,8 @@ try {
|
||||
} elseif ($celsius -lt 0) {
|
||||
$temp = "$($celsius)°C TOO COLD"
|
||||
$status = "⚠️"
|
||||
} elseif ($celsius -lt 30) {
|
||||
$temp = "$($celsius)°C cool"
|
||||
} else {
|
||||
$temp = "$($celsius)°C OK"
|
||||
}
|
||||
|
@ -63,7 +63,10 @@ try {
|
||||
$capacity = ""
|
||||
}
|
||||
if ($details.temperature.current -gt 50) {
|
||||
$temp = "$($details.temperature.current)°C (!)"
|
||||
$temp = "$($details.temperature.current)°C TOO HOT"
|
||||
$status = "⚠️"
|
||||
} elseif ($details.temperature.current -lt 0) {
|
||||
$temp = "$($details.temperature.current)°C TOO COLD"
|
||||
$status = "⚠️"
|
||||
} else {
|
||||
$temp = "$($details.temperature.current)°C"
|
||||
@ -81,13 +84,13 @@ try {
|
||||
$powerOn = "$($details.power_cycle_count)x on/off"
|
||||
}
|
||||
if ($details.smart_status.passed) {
|
||||
$selftest = "selftest OK"
|
||||
$selftest = "test passed"
|
||||
} else {
|
||||
$selftest = "selftest FAILED"
|
||||
$selftest = "test FAILED"
|
||||
$status = "⚠️"
|
||||
}
|
||||
$firmwareVersion = $details.firmware_version
|
||||
Write-Host "$status $capacity$modelName via $protocol ($temp, $hours, $powerOn, v$firmwareVersion) - $selftest"
|
||||
Write-Host "$status $capacity$modelName via $protocol ($hours, $powerOn, v$firmwareVersion) - $temp & $selftest"
|
||||
}
|
||||
#Write-Progress -completed "Done."
|
||||
exit 0 # success
|
||||
|
Loading…
Reference in New Issue
Block a user