mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-13 01:18:31 +01:00
Updated some scripts
This commit is contained in:
parent
1e227f3ba4
commit
abb97e1c9f
@ -42,7 +42,7 @@ function GetCPUTemperature {
|
||||
}
|
||||
|
||||
try {
|
||||
Write-Progress "Querying CPU status... "
|
||||
Write-Progress "Querying the CPU status... "
|
||||
$status = "✅"
|
||||
$arch = GetCPUArchitecture
|
||||
if ($IsLinux) {
|
||||
|
@ -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
|
||||
|
@ -21,6 +21,6 @@
|
||||
& "$PSScriptRoot/check-ram.ps1"
|
||||
& "$PSScriptRoot/check-gpu.ps1"
|
||||
& "$PSScriptRoot/check-smart-devices.ps1"
|
||||
& "$PSScriptRoot/check-drives.ps1"
|
||||
& "$PSScriptRoot/check-power.ps1"
|
||||
& "$PSScriptRoot/check-drives.ps1"
|
||||
exit 0 # success
|
||||
|
@ -7,7 +7,7 @@
|
||||
Specifies the minimum level in GB (10 GB by default)
|
||||
.EXAMPLE
|
||||
PS> ./check-swap-space.ps1
|
||||
✅ Swap space uses 42%, 748MB free of 1GB
|
||||
✅ Swap space uses 42% of 1GB · 748MB free
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
.NOTES
|
||||
@ -53,7 +53,7 @@ try {
|
||||
Write-Output "✅ Swap space unused, $(MB2String $Free) free"
|
||||
} else {
|
||||
[int]$Percent = ($Used * 100) / $Total
|
||||
Write-Output "✅ Swap space uses $Percent%, $(MB2String $Free) free of $(MB2String $Total)"
|
||||
Write-Output "✅ Swap space uses $Percent% of $(MB2String $Total) · $(MB2String $Free) free"
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user