Update check-drive-space.ps1

This commit is contained in:
Markus Fleschutz 2021-09-11 11:20:27 +02:00 committed by GitHub
parent a8e9bfe88f
commit 6bbadea146
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,10 +22,10 @@ try {
[int]$Total = ($Used + $Free)
if ($Free -lt $MinLevel) {
write-warning "Drive $Drive has only $Free GB left to use! ($Used GB out of $Total GB in use, 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
}
"✔️ $Free GB left on drive $Drive ($Used GB of $Total GB used)"
"✔️ $Free GB left on drive $Drive ($Used of $Total GB used)"
exit 0
} catch {
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"