mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-12 11:34:47 +02:00
Update check-swap-space.ps1
This commit is contained in:
parent
f23f3518b6
commit
b6319be2b2
@ -46,13 +46,13 @@ try {
|
|||||||
if ($Total -eq 0) {
|
if ($Total -eq 0) {
|
||||||
"⚠️ No swap space!"
|
"⚠️ No swap space!"
|
||||||
} elseif ($Free -lt $MinLevel) {
|
} elseif ($Free -lt $MinLevel) {
|
||||||
"⚠️ Swap space has only $(MB2String $Free) of $(MB2String $Total) left to use!"
|
"⚠️ Only $(MB2String $Free) of $(MB2String $Total) swap space left to use!"
|
||||||
} elseif ($Used -eq 0) {
|
} elseif ($Used -eq 0) {
|
||||||
"✅ Swap space of $(MB2String $Total) is unused."
|
"✅ $(MB2String $Total) swap space ready to use."
|
||||||
} elseif ($Used -lt $Free) {
|
} elseif ($Used -lt $Free) {
|
||||||
"✅ Swap space uses $(MB2String $Used) of $(MB2String $Total)."
|
"✅ $(MB2String $Used) of $(MB2String $Total) swap space in use."
|
||||||
} else {
|
} else {
|
||||||
"✅ Swap space has $(MB2String $Free) of $(MB2String $Total) left."
|
"✅ $(MB2String $Free) of $(MB2String $Total) swap space left."
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user