I had this same problem. Repair the CBS using Dism and sfc.
Worked after that. From an administrative PowerShell or cmd prompt :
DISM /Online /Cleanup-Image /RestoreHealth
SFC /scannow
Then run the client side script
https://www.ajtek.ca/wsus/client-machines-not-reporting-to-wsus-properly/