Improve the scripts

This commit is contained in:
Markus Fleschutz
2021-03-20 16:23:49 +01:00
parent 1fc4d5af0e
commit 6a0e3eb002
3 changed files with 7 additions and 3 deletions

View File

@ -15,7 +15,11 @@ try {
exit 0
}
write-host -foregroundColor green "OK - CPU has $Temp °C"
if ($Temp -gt "80") {
write-warning "CPU has $Temp °C!"
} else {
write-host -foregroundColor green "OK - CPU has $Temp °C"
}
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"