fixes
This commit is contained in:
parent
69f27a6708
commit
0080ca2859
@ -23,14 +23,18 @@ Function Write-Log{
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($i in $volumes) {
|
foreach ($i in $volumes) {
|
||||||
$result=Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan
|
if ($i.FileSystemLabel -eq "") {
|
||||||
|
Write-Output ""
|
||||||
if ($result.value -gt 0) {
|
|
||||||
Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan -OfflineScanAndFix
|
|
||||||
$requireReboot = $true
|
|
||||||
} else {
|
} else {
|
||||||
Write-Output $i.FileSystemLabel + ": Drive is OK!"
|
$result=Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan
|
||||||
Write-Log $now + ',' + $i.FileSystemLabel + ',' + $result + ',' + $targetComputer
|
|
||||||
|
if ($result.value -gt 0) {
|
||||||
|
Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan -OfflineScanAndFix
|
||||||
|
$requireReboot = $true
|
||||||
|
} else {
|
||||||
|
Write-Output $i.FileSystemLabel + ": Drive is OK!"
|
||||||
|
Write-Log $now + ',' + $i.FileSystemLabel + ',' + $result + ',' + $targetComputer
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user