Skip to content

Instantly share code, notes, and snippets.

@christopher-baek
Created February 4, 2022 05:37
Show Gist options
  • Save christopher-baek/53dbfb02b861ee38eda13c0994323072 to your computer and use it in GitHub Desktop.
Save christopher-baek/53dbfb02b861ee38eda13c0994323072 to your computer and use it in GitHub Desktop.

Commands

Run the following at an elevated prompt:

Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /RestoreHealth
SFC /scannow

Alternatively, copy the following into a batch file and execute with elevated privileges:

@echo off
date /t & time /t
echo Dism /Online /Cleanup-Image /StartComponentCleanup
Dism /Online /Cleanup-Image /StartComponentCleanup
echo ...
date /t & time /t
echo Dism /Online /Cleanup-Image /RestoreHealth
Dism /Online /Cleanup-Image /RestoreHealth
echo ...
date /t & time /t
echo SFC /scannow
SFC /scannow
date /t & time /t
pause

Power Troubleshooter

Run the following to launch the tool:

msdt.exe /id PowerDiagnostic

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment