The Certificate Authority Service is installed on this computer

Solution 1:

If a Windows computer is a certification authority, it can't be renamed and it can't be joined or unjoined to/from a domain. Before renaming the computer or changing its domain membership, you need to remove the Certification Authority role.