Script to reset WSUS ID

Reading Time: < 1 minute

Copy the below script to notepad, rename file (example, ResetWSUSid.bat

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId
pause

net stop wuauserv
net stop bits
@ping 127.0.0.1 -n 2 >NUL
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientIdValidation /f

pause
net start wuauserv
net start bits

gpupdate /force
@ping 127.0.0.1 -n 3 >NUL
wuauclt /resetauthorization
wuauclt /detectnow
wuauclt /reportnow

@ping 127.0.0.1 -n 5 >NUL
notepad c:\windows\WindowsUpdate.log
@ping 127.0.0.1 -n 10 >NUL
notepad c:\windows\WindowsUpdate.log

Failed to open event cache file at C:\WINDOWS\SoftwareDistribution\EventCache

Reading Time: 2 minutes

1) Copy and paste the below into a notepad, rename to a .bat and run:

net stop wuauserv
regsvr32 /s wuapi.dll
regsvr32 /s wups.dll
regsvr32 /s wuaueng.dll
regsvr32 /s wucltui.dll
regsvr32 /s wuweb.dll
regsvr32 /s wups2.dll
regsvr32 /s msxml3.dll
regsvr32 /s atl.dll
regsvr32 /s qmgrprxy.dll
regsvr32 /s wuanueng1.dll
regsvr32 /s atl.dll
regsvr32 /s msxml.dll
regsvr32 /s msxml2.dll
regsvr32 /s qmgr.dll

c:
cd %windir%\SoftwareDistribution
rd /s/q DataStore
mkdir DataStore
rd /s/q Download
mkdir Download
net start wuauserv
rem Fixes problem with client machines not showing up on the server
rem due to imaging method
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
cls
@echo Triggering detection after resetting WSUS client identify
net stop “Automatic Updates”
net start “Automatic Update”
wuauclt /resetauthorization /detectnow
echo susid set to unique>c:\wsusfix.txt

2) After running the above, do the same with the below:

@echo off
Echo This batch file will Force the Update Detection from the AU client:
Echo 1. Stops the Automatic Updates Service (wuauserv)
Echo 2. Deletes the LastWaitTimeout registry key (if it exists)
Echo 3. Deletes the DetectionstartTime registry key (if it exists)
Echo 4. Deletes the NextDetectionTime registry key (if it exists)
Echo 5. Restart the Automatic Updates Service (wuauserv)
Echo 6. Force the detection
Pause
@echo on
net stop wuauserv
REG DELETE “HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update” /v LastWaitTimeout /f
REG DELETE “HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update” /v DetectionstartTime /f
REG DELETE “HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update” /v NextDetectionTime /f
net start wuauserv
wuauclt /detectnow
@echo off
Echo This AU client will now check for the Updates on the Local WSUS Server.
Pause

And finally this:

@echo off
net stop wuauserv
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f 2>nul: 1>nul:
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f 2>nul: 1>nul:
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f 2>nul: 1>nul:
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientIdValidation /f 2>nul: 1>nul:
net start bits 2>nul: 1>nul:
net start wuauserv
wuauclt /resetauthorization /detectnow

Note: you may need to re enter the speech marks (“) after copying and pasting the above codes.

WSUS clients not checking into WSUS server

Reading Time: < 1 minute

A fix which worked for me was:

1) Click start
2) Click run
3) Type cmd and click ok
4) Type: net stop wuauserv 
5) Press enter
6) Type: Del “c:\windows\windows update.log”
7) Press enter
8.) Type: net start wuauserv
9) Press enter
10) Type: wuauclt.exe /resetauthorization /detectnow
11) Press enter
12) Wait for upto 10 minutes. Machine should start to check in

Force a client to download approved updates from WSUS

Reading Time: < 1 minute

If you have approved Windows updates on your WSUS server but do not see the Yellow Window updates icon when you logon to one of your servers or client machines, you can run the below command to force the detection and download of approved updates.

1) Click start
2) Click run
3) Type cmd and click ok
4) Type the following: wuauclt.exe /detectnow
5) Press enter
6) You may need to wait around 5-10 mins before the icon will appear