Reset WSUS/Automatic Updates

I have had many problems in the past trying to get Automatic Updates to talk to WSUS properly. This script will refresh all of the Automatic Updates settings on a server or workstation and hopefully connect the system back into WSUS.

@echo off
Echo This batch file will do the following:
Echo .
Echo Stop the wuauserv service
Echo Delete the AccountDomainSid registry key (if it exists)
Echo Delete the PingID registry key (if it exists)
Echo Delete the SusClientId registry key (if it exists)
Echo Delete the SusClientIDValidation registry key (if it exists)
Echo Delete the SoftwareDistribution folder
Echo Delete the Windows Update log file
Echo Restart the wuauserv service
Echo Resets the Authorization Cookie
Echo .
pause
@echo on
net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientIDValidation /f
cd %SystemRoot%
del /Q SoftwareDistribution
del WindowsUpdate.log
net start wuauserv
wuauclt /resetauthorization /detectnow

One Reply to “Reset WSUS/Automatic Updates”

Leave a Reply

Your email address will not be published. Required fields are marked *

*