The evaluation version of Windows Server allows you to test the Operating System without purchasing the license immediately, once the term has expired, if you do not activate a definitive license, Windows will perform a shutdown of the server at regular intervals making the system unusable.
To transform the Windows Server DEMO (TRIAL) license into the definitive STANDARD license, use the following command:
Open CMD as Administrator (Run as administrator)
DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXX-XXXX /AcceptEula
Set-Edition specifies the edition to which you want to convert the TRIAL in this case we switch to a ServerStandard license