Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions functions/public/Invoke-WPFSystemRepair.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ function Invoke-WPFSystemRepair {
<#
.SYNOPSIS
Checks for system corruption using SFC, and DISM
Checks for disk failure using Chkdsk

.DESCRIPTION
1. SFC - Fixes system file corruption, and fixes DISM if it was corrupted
2. DISM - Fixes system image corruption, and fixes SFC's system image if it was corrupted
3. Chkdsk - Checks for disk errors, which can cause system file corruption and notifies of early disk failure
1. Chkdsk - Checks for disk errors, which can cause system file corruption and notifies of early disk failure
2. SFC - scans protected system files for corruption and fixes them
3. DISM - Repair a corrupted Windows operating system image
#>
Start-Process cmd.exe -ArgumentList "/c chkdsk.exe /scan /perf" -NoNewWindow -Wait

Start-Process cmd.exe -ArgumentList "/c chkdsk /scan /perf" -NoNewWindow -Wait
Start-Process cmd.exe -ArgumentList "/c sfc /scannow" -NoNewWindow -Wait
Start-Process cmd.exe -ArgumentList "/c dism /online /cleanup-image /restorehealth" -NoNewWindow -Wait

Expand Down
Loading