WSUS Troubleshooting: Scan Error 0x80004005

Root Cause:

Group policy over riding the local policy and leaving the machines vulnerable and not patching.

Resolution

If you have the below error in the environment this is an issue with the group policy over riding the local policy and leaving the machines vulnerable and not patching since the issue reported this will be resolved by just deleting the registry.pol file from C:\Windows\System32\GroupPolicy\Machine, which would get created in the next policy interval.

The below script which we used to automate. If it’s a less number it can be deleted manually. Check the script before going to many machines:

' This script will delete Registry.pol file
 
Dim fso, wshshell, folder32, folder64
 
Set fso = CreateObject("Scripting.FileSystemObject")
 
Set WshShell = CreateObject("WScript.Shell")
 
folder32 = "C:\Windows\System32\GroupPolicy\Machine"
 
folder64 = "C:\Windows\SysWOW64\GroupPolicy\Machine"
 
if fso.FileExists(folder32 & "\Registry.pol") Then
 
 fso.DeleteFile(folder32 & "\Registry.pol")
 
 'MsgBox("File system32 Deleted")
 
else
 
 fso.DeleteFile(folder64 & "\Registry.pol")
 
 'MsgBox("File system64 Deleted")
 
                
 
End if
 
Set WshShell = Nothing
 
script.Quit