mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-16 11:40:53 +01:00
Update check-smart-devices.ps1
This commit is contained in:
parent
cb53701a0a
commit
cea14316e6
@ -47,9 +47,7 @@ try {
|
||||
continue
|
||||
} elseif ($IsLinux) {
|
||||
$Details = (sudo smartctl --all --json $Device) | ConvertFrom-Json
|
||||
if ($lastExitCode -ne "0") { throw "'sudo smartctl --all --json $Device' exited with error code $lastExitCode" }
|
||||
$null = (sudo smartctl --test=short $Device)
|
||||
if ($lastExitCode -ne "0") { throw "'sudo smartctl --test=short $Device' exited with error code $lastExitCode" }
|
||||
} else {
|
||||
$Details = (smartctl --all --json $Device) | ConvertFrom-Json
|
||||
$null = (smartctl --test=short $Device)
|
||||
|
Loading…
Reference in New Issue
Block a user