I have been scratching my head now for a while over this issue and anything I do will not solve the problem
The Problem:
WSUS' "WSUSContent" folder is self-deleting updates and reducing the overall size to <5GB. The original size was over 300GB. Where have the updates gone? We did not initiate a WSUSContent cleanup nor have we in the past.
Attempts at solving:
WSUSutil /reset.
Reinstall WSUS service from scratch.
Migrated from internal database to remote SQL database.
Further Information:
2015-03-30 14:25:19:174 1184 195c Setup FATAL: GetClientUpdateUrl failed, err = 0x8024D009 2015-03-30 14:25:19:174 1184 195c Setup Skipping SelfUpdate check based on the /SKIP directive in wuident 2015-03-30 14:25:19:174 1184 195c Setup SelfUpdate check completed. SelfUpdate is NOT required.
The WSUS administration console has encountered an unexpected error. This may be a transient error; try restarting the administration console. If this error persists,
Try removing the persisted preferences for the console by deleting the wsus file under %appdata%\Microsoft\MMC.
System.Collections.Generic.KeyNotFoundException -- The given key was not present in the dictionary.
Source mscorlib
Stack Trace: at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetUpdateRow(WsusUpdate update) at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetListRows()
WSUS not receiving updates? & WSUS, installed, not applicable
Many others on the internet also to try and find an answer.
Windows Log File "Red" Entries:
These are the critical log entries I have tried looking into, to no avail also, unless I am overlooking something..
Any help would be appreciated as this is just very unusual to happen.
So, odd fix.
My WSUSContent folder had 0.99GB in it and after a manual server cleanup(did not select unneeded update files) waited about 45 minutes and then selecting unneeded update files..another minute goes by, the WSUSContent folder is at 100GB (from 0.99GB, the internet speed is not fast enough here to grab 99GB in <45 minutes) and 50,000 updates are approved.
It works though. Very, very strange. Nothing in logs requested a cleanup, nor was space an issue. How very bizarre.
Thank you all for your suggestions!
Can I echo what @Proxy said:
odd fix ... Very, very strange. ... How very bizarre.
My Samsung laptop has Windows 8.1-Update. It had an infection that was cleaned. Current date is 05/16/2017 but last windows update was 2 years ago back in 2015.
Windows updates were not working after it was cleaned of malware. It would hang, no progress in c:\windows\WindowsUpdate.log
, and yet taking up 100% of one core.
One consequence of being 2 years out of date, that might be relevant, was that GWX (Get Windows 10) was still running on this laptop, even tho that offer expired over 1 year ago.
The other notable thing with this laptop was that I replaced the motherboard twice. The first time, it was crashing multiple times a day. The second motherboard worked fine. So those crashes may have had an effect here.
After trying almost everything, this is what worked: Windows cleanmgr.exe
aka "Disk Cleanup" aka "Clean up disk space by deleting unnecessary files".
I selected:
After that, and a reboot, Windows Update worked. How very bizarre.
Here's some of the prominent solutions I tried that didn't work:
:: consider carefully /ResetBase -- it prevents you from un-installing windows updates
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase
Dism /Online /Cleanup-Image /RestoreHealth
sfc /scannow
I had to run those more than once. Each of those steps fixed corruption. Until they passed with no corruption found.
Still, Windows Update would not work. Still hung.
Going deeper I tried this fix, "Option 2" from sevenforums https://www.sevenforums.com/tutorials/91738-windows-update-reset.html :
Reset_Reregister_Windows_Update_Components.bat
Here's the contents of that batch file as of today:
@echo off
:: Created by: Shawn Brink
:: http://www.sevenforums.com
:: Tutorial: http://www.sevenforums.com/tutorials/91738-windows-update-reset.html
set b=0
:bits
set /a b=%b%+1
if %b% equ 3 (
goto end1
)
net stop bits
echo Checking the bits service status.
sc query bits | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto bits
)
goto loop2
:end1
cls
echo.
echo Failed to reset Windows Update due to bits service failing to stop.
echo.
pause
goto Start
:loop2
set w=0
:wuauserv
set /a w=%w%+1
if %w% equ 3 (
goto end2
)
net stop wuauserv
echo Checking the wuauserv service status.
sc query wuauserv | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto wuauserv
)
goto loop3
:end2
cls
echo.
echo Failed to reset Windows Update due to wuauserv service failing to stop.
echo.
pause
goto Start
:loop3
set app=0
:appidsvc
set /a app=%app%+1
if %app% equ 3 (
goto end3
)
net stop appidsvc
echo Checking the appidsvc service status.
sc query appidsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto appidsvc
)
goto loop4
:end3
cls
echo.
echo Failed to reset Windows Update due to appidsvc service failing to stop.
echo.
pause
goto Start
:loop4
set c=0
:cryptsvc
set /a c=%c%+1
if %c% equ 3 (
goto end4
)
net stop cryptsvc
echo Checking the cryptsvc service status.
sc query cryptsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto cryptsvc
)
goto Reset
:end4
cls
echo.
echo Failed to reset Windows Update due to cryptsvc service failing to stop.
echo.
pause
goto Start
:Reset
Ipconfig /flushdns
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
cd /d %windir%\system32
Ren %systemroot%\system32\catroot2 catroot2.bak
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
regsvr32 /s wudriver.dll
netsh winsock reset
:Start
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
bitsadmin.exe /reset /allusers
I tried an expanded version that added stopping/starting of msiserver
and a rename of %systemroot%\SoftwareDistribution
and which stopped wuauserv
last because windows may auto-re-start it.
Here's that code:
:rem v2 with ren whole SoftwareDistribution
:rem and stop / start msiserver
@echo off
:: Created by: Shawn Brink
:: http://www.sevenforums.com
:: Tutorial: http://www.sevenforums.com/tutorials/91738-windows-update-reset.html
:rem ---------- bits ----------
:loop1
set b=0
:bits
set /a b=%b%+1
if %b% equ 3 (
goto end1
)
net stop bits
echo Checking the bits service status.
sc query bits | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto bits
)
goto loop2
:end1
cls
echo.
echo Failed to reset Windows Update due to bits service failing to stop.
echo.
pause
goto Start
:rem ---------- appidsvc ----------
:loop2
set app=0
:appidsvc
set /a app=%app%+1
if %app% equ 3 (
goto end2
)
net stop appidsvc
echo Checking the appidsvc service status.
sc query appidsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto appidsvc
)
goto loop3
:end2
cls
echo.
echo Failed to reset Windows Update due to appidsvc service failing to stop.
echo.
pause
goto Start
:rem ---------- cryptsvc ----------
:loop3
set c=0
:cryptsvc
set /a c=%c%+1
if %c% equ 3 (
goto end3
)
net stop cryptsvc
echo Checking the cryptsvc service status.
sc query cryptsvc | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto cryptsvc
)
goto loop4
:end3
cls
echo.
echo Failed to reset Windows Update due to cryptsvc service failing to stop.
echo.
pause
goto Start
:rem ---------- msiserver ----------
:loop4
set w=0
:msiserver
set /a w=%w%+1
if %w% equ 3 (
goto end4
)
net stop msiserver
echo Checking the msiserver service status.
sc query msiserver | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto msiserver
)
goto loop5
:end4
cls
echo.
echo Failed to reset Windows Update due to msiserver service failing to stop.
echo.
pause
goto Start
:rem ---------- wuauserv ----------
:loop5
set w=0
:wuauserv
set /a w=%w%+1
if %w% equ 3 (
goto end5
)
net stop wuauserv
echo Checking the wuauserv service status.
sc query wuauserv | findstr /I /C:"STOPPED"
if not %errorlevel%==0 (
goto wuauserv
)
goto Reset
:end5
cls
echo.
echo Failed to reset Windows Update due to wuauserv service failing to stop.
echo.
pause
goto Start
:rem ---------- Reset ----------
:Reset
Ipconfig /flushdns
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
cd /d %windir%\system32
Ren %systemroot%\system32\catroot2 catroot2.bak
cd %systemroot%\
ren SoftwareDistribution SoftwareDistribution_mm.bak
regsvr32.exe /s atl.dll
regsvr32.exe /s urlmon.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s browseui.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s oleaut32.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
regsvr32 /s wudriver.dll
netsh winsock reset
:Start
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
net start msiserver
bitsadmin.exe /reset /allusers
And after all that what got Windows Update to work again was cleanmgr
User contributions licensed under CC BY-SA 3.0