This commit is contained in:
Wyatt J. Miller 2021-06-18 20:57:06 -04:00
parent 776bea8402
commit e56e2f942b

View File

@ -28,10 +28,10 @@ foreach ($i in $volumes.DriveLetter) {
if ($i.DriveLetter -eq "") { if ($i.DriveLetter -eq "") {
Write-Output "" Write-Output ""
} else { } else {
$result=Repair-Volume -FileSystemLabel $i.DriveLetter -Scan $result=Repair-Volume -DriveLetter $i.DriveLetter -Scan
if ($result.value -gt 0) { if ($result.value -gt 0) {
Repair-Volume -FileSystemLabel $i.DriveLetter -Scan -OfflineScanAndFix Repair-Volume -DriveLetter $i.DriveLetter -Scan -OfflineScanAndFix
$requireReboot = $true $requireReboot = $true
} else { } else {
Write-Output "$($i.FileSystemLabel): Drive is OK!" Write-Output "$($i.FileSystemLabel): Drive is OK!"