0x80248007 — the update datastore is damaged
Windows Update's own database has no record where it expects one, usually because the datastore file is corrupt or a licence term was never accepted.
What you see
Scanning for updates fails immediately with 0x80248007. The message sometimes mentions missing licence terms, which is misleading in most cases.
What is actually wrong
DataStore.edb under SoftwareDistribution is corrupt. Occasionally the Windows Installer service is not running, which produces the same code.
Codes and articles
The fix
Rebuild the update datastore
Scans fail with this code. Rebuilding loses the update history, not the installed updates.
Confirm the Windows Installer service can start — this alone fixes a minority of cases.
Set-Service msiserver -StartupType ManualStart-Service msiserverGet-Service msiserver | Format-Table Name, Status, StartType
Stop the update services.
Stop-Service wuauserv, bits, cryptsvc -ForceRename the datastore rather than deleting it.
Rename-Item C:\Windows\SoftwareDistribution\DataStore DataStore.oldRenaming keeps a copy in case the machine is under an audit that needs the update history, and costs nothing.
Start the services and force a fresh scan.
Start-Service cryptsvc, bits, wuauservUSOClient.exe StartScan
The first scan rebuilds the database and is noticeably slower than usual.
Get-Service wuauserv | Format-Table Name, StatusRelated faults
Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.