mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-20 08:58:18 +02:00
Merge branch 'master' of github.com:fleschutz/PowerShell
This commit is contained in:
commit
c5e2f92a4c
@ -52,9 +52,7 @@ try {
|
|||||||
if ($lastExitCode -ne "0") { throw "'sudo smartctl --test=short $Device' exited with error code $lastExitCode" }
|
if ($lastExitCode -ne "0") { throw "'sudo smartctl --test=short $Device' exited with error code $lastExitCode" }
|
||||||
} else {
|
} else {
|
||||||
$Details = (smartctl --all --json $Device) | ConvertFrom-Json
|
$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)
|
$null = (smartctl --test=short $Device)
|
||||||
if ($lastExitCode -ne "0") { throw "'smartctl --test=short $Device' exited with error code $lastExitCode" }
|
|
||||||
}
|
}
|
||||||
$ModelName = $Details.model_name
|
$ModelName = $Details.model_name
|
||||||
$Protocol = $Details.device.protocol
|
$Protocol = $Details.device.protocol
|
||||||
|
Loading…
Reference in New Issue
Block a user