WSUS: Failed to run WSUS Server Cleanup. Error: The DELETE statement conflicted with the REFERENCE constraint

I received the following error when running the ‘Invoke-WsusServerCleanup -CleanupObsoleteComputers’ command on a WSUS instance. From searching through the database the problem appears to have been caused by a computer changing its Target Computer Group, but not being completely unassigned from the old computer group.

The ‘CleanupObsoleteComputers’ switch invokes a Stored Procedure in the
Continue reading WSUS: Failed to run WSUS Server Cleanup. Error: The DELETE statement conflicted with the REFERENCE constraint