mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-28 16:48:39 +01:00
Update check-smart-devices.ps1
This commit is contained in:
parent
2de3ecc59c
commit
6e972bb5d3
@ -52,9 +52,7 @@ try {
|
||||
if ($lastExitCode -ne "0") { throw "'sudo smartctl --test=short $Device' exited with error code $lastExitCode" }
|
||||
} else {
|
||||
$Details = (smartctl --all --json $Device) | ConvertFrom-Json
|
||||
if ($lastExitCode -ne "0") { throw "'smartctl --all --json $Device' exited with error code $lastExitCode" }
|
||||
$null = (smartctl --test=short $Device)
|
||||
if ($lastExitCode -ne "0") { throw "'smartctl --test=short $Device' exited with error code $lastExitCode" }
|
||||
}
|
||||
$ModelName = $Details.model_name
|
||||
$Protocol = $Details.device.protocol
|
||||
|
Loading…
Reference in New Issue
Block a user