Hello! I've been tracking and troubleshooting this issue since June. Today I found a simple method to effectively revert WUAPI to its "non-Preview" build, using a config file (C:\ProgramData\Microsoft\Windows\OneSettings\UusSettings.json). Here's an unmodified sample:
{"queryUrl":"/settings/v3.0/WSD/UUS","settings":{"EXCLUSIONS":["1023.201.1012.0","121.511.1.0","1023.413.2122.0","1022.1108.2012.0"]}}
What I found is that the versions in this file are old Preview builds, and adding the latest Preview version (now 1306.2405.21022.0) will cause Windows to ignore this version and fall back to the non-Preview build (now 1219.2405.8012.0). Edit the file (Admin elevation required), reboot and you'll see the change (run (New-Object -ComObject Microsoft.Update.AgentInfo).GetInfo('ProductVersionString')
before and after).
The following code will get the currently active WUAPI version and add it to UusSettings.json after creating a backup of the file. So far in my testing this fully restores API functionality!
NOTE: The two Out-File commands are necessary to reconstruct UusSettings.json in the correct format (UTF8 with no BOM) so Windows recognizes the file and honors the exclusions.
$wuVer = (New-Object -ComObject Microsoft.Update.AgentInfo).GetInfo('ProductVersionString')
$uusJson = "C:\ProgramData\Microsoft\Windows\OneSettings\UusSettings.json"
$uusJsonBAK = "C:\ProgramData\Microsoft\Windows\OneSettings\UusSettings.json.BAK"
$uusObj = Get-Content $uusJson | ConvertFrom-Json
if ($uusObj.settings.EXCLUSIONS -notcontains $wuVer) {
Copy-Item $uusJson $uusJsonBAK -Force
$uusObj.settings.EXCLUSIONS += "$wuVer"
" " | Out-File $uusJson -Encoding ascii -NoNewline -Force
$uusObj | ConvertTo-Json -Compress | Out-File $uusJson -Encoding UTF8 -Append -Force
}