This commit is contained in:
Wyatt J. Miller 2021-06-16 20:46:52 -04:00
parent c76d5ed2b7
commit 146e729b7a

View File

@ -16,7 +16,7 @@ Function Write-Log{
Param ([string]$logstring)
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
@ -29,7 +29,7 @@ foreach ($i in $volumes) {
Repair-Volume -FileSystemLabel $i.FileSystemLabel -Scan -OfflineScanAndFix
$requireReboot = $true
} else {
Write-Output "$(i.FileSystemLabel): Drive is OK!"
Write-Output $i.FileSystemLabel + ": Drive is OK!"
Write-Log $now + ',' + $i.FileSystemLabel + ',' + $result + ',' + $targetComputer
}
}