mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-28 15:46:35 +01:00
Update check-drive-space.ps1 and check-swap-space.ps1
This commit is contained in:
parent
e9bfd8cf10
commit
5e5d359049
@ -30,7 +30,7 @@ try {
|
|||||||
write-warning "Drive $Drive has only $Free GB left to use! ($Used of $Total GB used, minimum is $MinLevel GB)"
|
write-warning "Drive $Drive has only $Free GB left to use! ($Used of $Total GB used, minimum is $MinLevel GB)"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
"✔️ $Free GB left on drive $Drive ($Used of $Total GB used)"
|
"✔️ Drive $Drive has $Free GB left ($Used of $Total GB used)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
@ -39,7 +39,7 @@ try {
|
|||||||
write-warning "Swap space has only $Free GB left to use! ($Used of $Total GB used, minimum is $MinLevel GB)"
|
write-warning "Swap space has only $Free GB left to use! ($Used of $Total GB used, minimum is $MinLevel GB)"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
"✔️ $Free GB left for swap space ($Used of $Total GB used)"
|
"✔️ Swap space has $Free GB left ($Used of $Total GB used)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
Loading…
Reference in New Issue
Block a user