From 17668dcc01d4dc70157c055ab96f3c01351d1271 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sun, 6 Aug 2023 11:57:43 +0200 Subject: [PATCH] Update check-drives.ps1 --- Scripts/check-drives.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/check-drives.ps1 b/Scripts/check-drives.ps1 index 60365bf6..172f2169 100755 --- a/Scripts/check-drives.ps1 +++ b/Scripts/check-drives.ps1 @@ -7,7 +7,7 @@ Specifies the minimum warning level (10 GB by default) .EXAMPLE PS> ./check-drives - ✅ Drive C: uses 87GB of 249GB + ✅ Drive C: with 250GB is 10% full, 225GB free .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -48,10 +48,10 @@ try { } elseif ($Free -eq 0) { Write-Host "⚠️ Drive $ID with $(Bytes2String $Total) is 100% full" } elseif ($Free -lt $MinLevel) { - Write-Host "⚠️ Drive $ID with $(Bytes2String $Total) is nearly full ($(Bytes2String $Free) free)" + Write-Host "⚠️ Drive $ID with $(Bytes2String $Total) is nearly full, $(Bytes2String $Free) free" } else { [int]$Percent = ($Used * 100) / $Total - Write-Host "✅ Drive $ID $Percent% full, $(Bytes2String $Free) of $(Bytes2String $Total) free" + Write-Host "✅ Drive $ID with $(Bytes2String $Total) is $Percent% full, $(Bytes2String $Free) free" } } exit 0 # success