Windows updates failing

From elevated command prompt:
sfc /scannow
restart then
dism /Online /Cleanup-Image /RestoreHealth
this is also to do with problems downloading upgrade from Windows 7/8 to Windows 10.