You probably won't ever have to repair Windows, but if you think that one or more Windows system files have become damaged or corrupted you can run SFC from a command prompt as Admin. Note: docs recommend running SFC 3 times. Microsoft talks about the basics here support[.]microsoft[.]com/en-us/kb/929833
But generally if Windows is running, it's running, so there's much less likelihood you'll have a problem with Windows system files. Checking & restoring Windows system files however can help, & be a good place to start when Windows won't. You can use SFC &/or DISM from a command prompt using a Windows setup DVD/USB stick, or you can boot to a CD/DVD/USB stick with WinPE on it. The WinPE approach has advantages, e.g. I don't think most people don't have Windows 10 setup ISOs.
The hassle, & the reason for this post, is there's little in the way of documentation on using SFC, & particularly DISM to repair a Windows installation using WinPE... After playing around for an afternoon, here are some answers, or rather commands:
To run SFC:
sfc /scannow /offbootdir=*X*:\ /offwindir=*Y*:\Windows
Where *X* is the drive letter for the boot partition & *Y* is the drive letter for the partition with the copy of Windows you want to repair. Having an accurate drive letter for the "/offbootdir" switch does not appear to be critical if you don't have one. DiskPart [run diskpart /? for help] can be useful for finding out the drive letters after booting to WinPE, & can assign a drive letter to the boot partition if it doesn't have one, assuming you need it -- in tests I did not. You can also run the Dir *Z*: command, where *Z* is the drive letter for the partition you want to find out about -- the Dir command lists all the files & folders at the current place in the folder/file tree. When you boot to WinPE you'll typically be on the X drive, & C will be the letter for the media with WinPE on it.
To use DISM to check the health of Windows System Files:
dism /Image:*X*: /ScratchDir:C: /SysDriveDir:*X*:\ /Cleanup-Image /CheckHealth
Where *X* is the drive letter for the partition for the copy of Windows you want to check, & the /ScratchDir switch refers to a partition you can use for temporary storage -- I used C: because that's typically the media where you have WinPE, but it can be another partition, e.g. the same as *X*.
To use DISM to fix things:
dism /Image:*X*: /ScratchDir:C: /SysDriveDir:*X*:\ /Cleanup-Image /RestoreHealth /Source:*X*:\Temp\Install.esd /LimitAccess
Where *X* is again the drive letter for the copy of Windows that you want to repair. You can leave off the /Source & /LimitAccess switches, & DISM will try to find what it needs using Microsoft's Windows Update. /LimitAccess tells it not to -- /Source tells DISM where to look for known good copies of Windows files, & it can be a .wim or .esd file or a working copy of Windows. I had Install.esd copied to that Temp folder, but it could be anywhere that WinPE has access to. Note that your source should be the same version & build as the copy of Windows you're trying to repair. [This is one of the reasons it can be handy to save the Install.ESD file whenever 10 is upgraded.]
To get WinPE you 1st download parts of the Windows ADK. Once it's installed [& you don't have to install it to the partition where Windows lives], you 1st create a WinPE folder on your hard drive, then use that to create a WinPE CD/DVD/USB stick etc.
developer[.]microsoft[.]com/en-us/windows/hardware/windows-assessment-deployment-kit#winADK
msdn[.]microsoft[.]com/en-us/windows/hardware/commercialize/manufacture/desktop/winpe-intro
youtube[.]com/watch?v=UJWGeK7_XDE
msdn[.]microsoft[.]com/en-us/windows/hardware/commercialize/manufacture/desktop/winpe-create-a-boot-cd-dvd-iso-or-vhd