A Windows 10 PC is connected to a WSUS intranet server, like a lot of other PCs here which are functioning fine, but others do not receive WSUS updates. I've written .bat file to force remote pc to download and install the update, and .. restart but doesn't work fine !! can people with good health help me..
CODE
@Echo off
cd\
Echo Procedura di reset aggiornamenti WSUS
REM ****************************
REM * Variabili di procedura *
REM ****************************
set varcomputer= ////
set timerestart=360
goto force_up
REM :NOMEMACCHINA
Exit
REM ****************************
REM * PROCEDURE*
REM ****************************
:force_up
echo WSUS Force Update %varcomputer%
wuauclt /resetauthorization /detectnow /force \\%varcomputer%
wuauclt /updatenow /force \\%varcomputer%
echo Shutting down %varcomputer%.
shutdown -r -m \\%varcomputer% -t %timerestart% -c "Il PC si riavvierà automaticamente per effettuare degli aggiornamenti di sicurezza entro %timerestart% secondi. Si prega di salvare e chiudere i documenti aperti."
goto %varcomputer
echo ****** Procedura inviata *****
:FINE
pause
pause
pause
echo ****** Procedura inviata *****
pause
pause
WindowsUpdate.log
, then, check the errors in it:Get-WindowsUpdateLog