mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 05:04:39 +02:00
Update check-drives.ps1, check-smart-devices.ps1, and
list-earthquakes.ps1
This commit is contained in:
@ -33,6 +33,7 @@ function Bytes2String { param([int64]$Bytes)
|
||||
}
|
||||
|
||||
try {
|
||||
Write-Progress "⏳ Querying drives..."
|
||||
$Drives = Get-PSDrive -PSProvider FileSystem
|
||||
foreach($Drive in $Drives) {
|
||||
$ID = $Drive.Name
|
||||
@ -53,6 +54,7 @@ try {
|
||||
Write-Host "✅ Drive $ID has $(Bytes2String $Free) of $(Bytes2String $Total) free"
|
||||
}
|
||||
}
|
||||
Write-Progress -completed "Querying drives finished."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Reference in New Issue
Block a user