mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-23 08:23:14 +01:00
Update check-smart-devices.ps1
This commit is contained in:
parent
22f4dcab52
commit
a70c24b8c7
@ -40,14 +40,14 @@ try {
|
||||
if ($GBytes -eq 0) {
|
||||
$Capacity = ""
|
||||
} else {
|
||||
$Capacity = " $GBytes GB,"
|
||||
$Capacity = "($GBytes GB) "
|
||||
}
|
||||
$Temp = $Details.temperature.current
|
||||
$Firmware = $Details.firmware_version
|
||||
$PowerOn = $Details.power_cycle_count
|
||||
$Hours = $Details.power_on_time.hours
|
||||
if ($Details.smart_status.passed) { $Status = "passed" } else { $Status = "NOT PASSED" }
|
||||
"✅ Device $ModelName via $Protocol,$Capacity v$($Firmware), $($PowerOn)x on, $($Hours) hours, $($Temp)°C, $Status."
|
||||
"✅ Device $ModelName $($Capacity)via $Protocol, v$($Firmware), $($PowerOn)x on, $($Hours) hours, $($Temp)°C, $Status."
|
||||
}
|
||||
exit 0 # success
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user