Remote Configuration failed on WSUS Server

I got these error messages in the WCM.log when I was trying to sync the Software Updates in SCCM:

     Microsoft.UpdateServices.Administration. Error = 0x80131701
     Remote configuration failed on WSUS Server

I have the SUP role and WSUS installed on a remote site server, but the Primary server was unable to locate the WSUS database located on a remote SQL server.

     DB Server not detected for SUP ServerName from SCF File. skipping.

 

The fix:

Run this PowerShell command elevated on the Primary server and then restart the SMS_Executive service.

     Install-WindowsFeature -Name UpdateServices-ui

It installs the necessary WSUS files on the Primary server without installing the full WSUS console.