Update check-battery.ps1, check-drives.ps1, and check-swap-space.ps1

This commit is contained in:
Markus Fleschutz
2022-12-19 19:33:32 +01:00
parent 86463af566
commit c83f590247
3 changed files with 21 additions and 15 deletions

View File

@ -42,12 +42,14 @@ try {
if ($Total -eq 0) {
"✅ Drive $ID is empty"
} elseif ($Free -eq 0) {
"⚠️ Drive $ID with $(Bytes2String $Total) is full!"
} elseif ($Free -lt $MinLevel) {
"⚠️ Drive $ID has only $(Bytes2String $Free) of $(Bytes2String $Total) left to use!"
"⚠️ Drive $ID with $(Bytes2String $Total) is nearly full ($(Bytes2String $Free) free)!"
} elseif ($Used -lt $Free) {
"✅ Drive $ID uses $(Bytes2String $Used) of $(Bytes2String $Total)"
} else {
"✅ Drive $ID has $(Bytes2String $Free) free of $(Bytes2String $Total)"
"✅ Drive $ID has $(Bytes2String $Free) of $(Bytes2String $Total) free"
}
}
exit 0 # success