If you get scan error 0x8024400D on the
WindowsUpdate.log
“WARNING: SyncUpdates failure, error = 0x8024400D, soap client error = 7, soap error code = 300, HTTP status code = 200”
$Path_WU_Org = $Path_WU.value + "\SoftwareDistribution"
write-host (" ")
write-host ("Source folder: ") -foreground yellow -nonewline; write-host ($Path_WU_Org) -foreground green
write-host (" ")
write-host ("Cleaning up UpdateStore WMI") -foreground yellow
write-host (" ")
$WMI_CACHE_WU = Get-WmiObject -Class CCM_UpdateStatus -Namespace ROOT\ccm\SoftwareUpdates\UpdatesStore -ComputerName localhost
$WMI_CACHE_WU | Remove-WmiObject
write-host ("Stopping WUA") -foreground yellow
write-host (" ")
net stop "wuauserv"
sleep 30
write-host ("Renaming folder: ") -foreground yellow -nonewline; write-host ($Path_WU_Org) -foreground green
write-host (" ")
Rename-Item -Path $Path_WU_Org -NewName "SoftwareDistribution.old"
write-host ("Starting WUA") -foreground yellow
write-host (" ")
net start "wuauserv"