10 lines
279 B
PowerShell
10 lines
279 B
PowerShell
$SystemImage = Repair-WindowsImage -CheckHealth -Online
|
|
|
|
if ($SystemImage.ImageHealthState -ne "Healthy") {
|
|
exit 1
|
|
Write-Host $SystemImage.ImageHealthState
|
|
} elseif ($SystemImage.ImageHealthState -eq "Healthy") {
|
|
exit 0
|
|
Write-Host $SystemImage.ImageHealthState
|
|
}
|