mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-18 08:30:00 +02:00
Updated the manuals
This commit is contained in:
@@ -35,7 +35,7 @@ Example
|
||||
-------
|
||||
```powershell
|
||||
PS> ./check-drive-space.ps1 C
|
||||
✅ Drive C: uses 56%, 442GB free of 999GB
|
||||
✅ Drive C: has 442GB free (56% of 1TB used)
|
||||
|
||||
```
|
||||
|
||||
@@ -61,7 +61,7 @@ Script Content
|
||||
Specifies the minimum level in bytes (10GB by default)
|
||||
.EXAMPLE
|
||||
PS> ./check-drive-space.ps1 C
|
||||
✅ Drive C: uses 56%, 442GB free of 999GB
|
||||
✅ Drive C: has 442GB free (56% of 1TB used)
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@@ -100,8 +100,8 @@ try {
|
||||
} elseif ($free -lt $minLevel) {
|
||||
Write-Host "⚠️ Drive $driveName with $(Bytes2String $total) is nearly full, $(Bytes2String $free) free"
|
||||
} else {
|
||||
[int]$percent = ($used * 100) / $total
|
||||
Write-Host "✅ Drive $driveName uses $percent%, $(Bytes2String $free) free of $(Bytes2String $total)"
|
||||
[int64]$percent = ($used * 100) / $total
|
||||
Write-Host "✅ Drive $driveName has $(Bytes2String $free) free ($percent% of $(Bytes2String $total) used)"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
@@ -110,4 +110,4 @@ try {
|
||||
}
|
||||
```
|
||||
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 01/25/2024 13:58:36)*
|
||||
*(generated by convert-ps2md.ps1 using the comment-based help of check-drive-space.ps1 as of 03/27/2024 17:36:24)*
|
||||
|
Reference in New Issue
Block a user