This script will reset the Windows update to WSUS server.
net stop wuauserv -accepteula -nobanner
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f -accepteula -nobanner
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f -accepteula -nobanner
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f -accepteula -nobanner
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f -accepteula -nobanner
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIdValidation /f -accepteula -nobanner
net start wuauserv -accepteula -nobanner
wuauclt /resetauthorization -accepteula -nobanner
gpupdate /force -accepteula -nobanner
wuauclt /detectnow /reportnownow -accepteula -nobanner