mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 19:09:13 +01:00
Improve the scripts
This commit is contained in:
parent
1fc4d5af0e
commit
6a0e3eb002
@ -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])"
|
||||
|
@ -22,7 +22,7 @@ try {
|
||||
write-warning "Drive $Drive has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
|
||||
exit 1
|
||||
}
|
||||
write-host -foregroundColor green "OK - drive $Drive has $Free GB left ($Used GB used out of $Total GB, $MinLevel GB is minimum)"
|
||||
write-host -foregroundColor green "OK - drive $Drive has $Free GB left ($Used GB of $Total GB used, $MinLevel GB is minimum)"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -27,7 +27,7 @@ try {
|
||||
write-warning "Swap space has only $Free GB left to use! ($Used GB out of $Total GB in use, minimum is $MinLevel GB)"
|
||||
exit 1
|
||||
}
|
||||
write-host -foregroundColor green "OK - swap space has $Free GB left ($Used GB used out of $Total GB, minimum is $MinLevel GB)"
|
||||
write-host -foregroundColor green "OK - swap space has $Free GB left ($Used GB of $Total GB used, minimum is $MinLevel GB)"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user