mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-11 13:53:42 +02:00
Updated some scripts
This commit is contained in:
@ -7,8 +7,8 @@
|
||||
Specifies the minimum warning level (10 GB by default)
|
||||
.EXAMPLE
|
||||
PS> ./check-drives.ps1
|
||||
✅ Drive C: uses 49%, 512GB free of 1TB
|
||||
✅ Drive D: uses 84%, 641GB free of 4TB
|
||||
✅ Drive C: uses 49% of 1TB · 512GB free
|
||||
✅ Drive D: uses 84% of 4TB · 641GB free
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -51,7 +51,7 @@ try {
|
||||
Write-Host "⚠️ Drive $name with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free"
|
||||
} else {
|
||||
[int]$percent = ($used * 100) / $total
|
||||
Write-Host "✅ Drive $name uses $percent%, $(Bytes2String $free) free of $(Bytes2String $total)"
|
||||
Write-Host "✅ Drive $name uses $percent% of $(Bytes2String $total) · $(Bytes2String $free) free"
|
||||
}
|
||||
}
|
||||
exit 0 # success
|
||||
|
Reference in New Issue
Block a user