After installing a Windows server 2019, the activation failed with the error code 0xC004F074
The iso from which the installation was done is expecting to find a Key Management Service (KMs) on the local area network. In order to solve the problem, the solution is to change the product key to much the one bought from Microsoft.
Open the browser and type in the Microsoft Licensing URL https://www.microsoft.com/Licensing/servicecenter/Downloads/DownloadsAndKeys.aspx
A valid account is needed to be able to download iso images and keys
Go to the Downloads and keys tab
Look for the installed Windows version (Windows 2019 Standard in our case)
Copy the key (clé in french) in the clipboard
Open a DOS Windows and type :
slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
where XXXXX-XXXXX-XXXXX-XXXXX-XXXXX the key copied previously
Proceed with the activation and voilà Windows gets activated
N.B. Some screen shots are in french because I use a french windows version.