fixes
This commit is contained in:
parent
c76d5ed2b7
commit
146e729b7a
@ -16,7 +16,7 @@ Function Write-Log{
|
|||||||
Param ([string]$logstring)
|
Param ([string]$logstring)
|
||||||
|
|
||||||
if (-not(Test-Path -Path $logFile -PathType Leaf)) {
|
if (-not(Test-Path -Path $logFile -PathType Leaf)) {
|
||||||
Add-Item -ItemType File -Path $logFile -Force
|
New-Item -ItemType File -Path $logFile -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
Add-Content $logFile -value $logstring
|
Add-Content $logFile -value $logstring
|
||||||
@ -29,7 +29,7 @@ foreach ($i in $volumes) {
|
|||||||
Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan -OfflineScanAndFix
|
Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan -OfflineScanAndFix
|
||||||
$requireReboot = $true
|
$requireReboot = $true
|
||||||
} else {
|
} else {
|
||||||
Write-Output "$(i.FileSystemLabel): Drive is OK!"
|
Write-Output $i.FileSystemLabel + ": Drive is OK!"
|
||||||
Write-Log $now + ',' + $i.FileSystemLabel + ',' + $result + ',' + $targetComputer
|
Write-Log $now + ',' + $i.FileSystemLabel + ',' + $result + ',' + $targetComputer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user