Script runs the sfc /scannow command to run the Windows system file checker. SFC will repair any system files if needed. Script then writes if any files were repaired or if system files were ok.
Script runs the sfc /verifyonly command to determine if any system files need to be repaired. Script then compares results and writes if scan is needed or not.