mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-27 02:14:31 +01:00
Update check-smart-devices.ps1
This commit is contained in:
parent
9060f0099a
commit
a084275235
@ -5,7 +5,7 @@
|
|||||||
This PowerShell script queries and prints your S.M.A.R.T. HDD/SSD devices.
|
This PowerShell script queries and prints your S.M.A.R.T. HDD/SSD devices.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./check-smart-devices
|
PS> ./check-smart-devices
|
||||||
✅ Device HFM256GD3JX016N (SMART nvme), 238GB, 126x on, 71h, 29°C, passed
|
✅ Device HFM256GD3JX016N (SMART nvme), 238GB, 126x on, 71h, 29°C, passed.
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -41,7 +41,7 @@ try {
|
|||||||
$PowerOn = $Details.power_cycle_count
|
$PowerOn = $Details.power_cycle_count
|
||||||
$Hours = $Details.power_on_time.hours
|
$Hours = $Details.power_on_time.hours
|
||||||
if ($Details.smart_status.passed) { $Status = "passed" } else { $Status = "NOT PASSED" }
|
if ($Details.smart_status.passed) { $Status = "passed" } else { $Status = "NOT PASSED" }
|
||||||
"✅ SMART device $ModelName ($Type), $($Capacity)GB, $($PowerOn)x on, $($Hours) hours, $($Temp)°C, $Status"
|
"✅ SMART device $ModelName ($Type), $($Capacity)GB, $($PowerOn)x on, $($Hours) hours, $($Temp)°C, $Status."
|
||||||
}
|
}
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user