# WinUtil — System Repair # Źródło: https://github.com/christitustech/winutil/blob/main/functions/public/Invoke-WPFSystemRepair.ps1 # Wymaga: PowerShell jako Administrator #Requires -RunAsAdministrator Write-Host "==> Uruchamianie naprawy systemu Windows..." -ForegroundColor Cyan Write-Host " [1/3] Sprawdzanie błędów dysku (Chkdsk)..." Start-Process -FilePath "cmd.exe" -ArgumentList "/c chkdsk /scan /perf" -NoNewWindow -Wait Write-Host " [2/3] Sprawdzanie plików systemowych (SFC)..." Start-Process -FilePath "cmd.exe" -ArgumentList "/c sfc /scannow" -NoNewWindow -Wait Write-Host " [3/3] Naprawa obrazu systemu (DISM)..." Start-Process -FilePath "cmd.exe" -ArgumentList "/c dism /online /cleanup-image /restorehealth" -NoNewWindow -Wait Write-Host "==> Naprawa systemu zakończona." -ForegroundColor Green Write-Host "Zalecane: uruchom ponownie komputer." -ForegroundColor Yellow