The mot interesting thing in your log is this:
I'm not sure if the script running without rebooting between steps could be an issue. Please try to reboot and run the script again. Make sure you are connected to the internet also - just open a web page first to check.
C:\WINDOWS\system32>Dism /Online /Cleanup-Image /RestoreHealth
Deployment Image Servicing and Management tool
Image Version: 6.3.9600.17031
The restore operation failed. Either the repair source was not found or the comp
onent store cannot be repaired.
DISM failed. No operation was performed.
If it fails (and the results look the same) please post the logs.