Windows Command Line Repair commands

Lately I find that doing some repair commands at the command prompt in windows seems to fix just about any of the “something isn’t working right” problems, but I know they’re not hardware related.

Anyway from an elevated command prompt these are the commands

1.

sfc /scannow

That fixes most of the issues.

2.

DISM.exe /Online /Cleanup-image /Scanhealth && DISM.exe /Online /Cleanup-image /Restorehealth

Now there’s two parts to the script. There’s the scan health part and the restore health part. You can run the first one by just running everything before the && but I typically run just both at the same time.

Now not that I’ve ever ran into it honestly but if it says something about “cannot find source files”

You need to get an iso of the exact same system  Then run this.

DISM /Online /Cleanup-Image /RestoreHealth /source:WIM:X:\Sources\Install.wim:1 /LimitAccess

Where the X is you need to change to the location of the drive where the iso is.

I’ll be honest I’d say 80% of the time the SFC command works if it’s just something that seems corrupt. The DISM I can’t say I’ve had a computer get fixed by that one, but I always run it to make certain things are working fine.

They’re fairly simple things you can do and it doesn’t hurt to try.

Leave a Reply

Your email address will not be published. Required fields are marked *