To activate your Windows server trial which gives you 180 days:
To renew your license for 180 days (can be done 6 times):
Note that if you don't activate your Windows on time each hour it will log you off and physically power itself down (a big pain for servers in a datacenter or remote location of any sort).
This works on basically all Windows server versions including 2008, 2012, 2016 and 2019 Server.
How To Check License Status and Expiration
slmgr /dlv
Once you have done the 6 times of re-arming you must re-install Windows.
You'll get this error once you have exceeded the limit:
Error: 0xC004D307 The maximum allowed number of re-arms has been exceeded. You must re-install the OS before trying to re-arm again.
You can disable the re-arm feature in the registry:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm
server, activate, extend, trialto, quot, renew, slmgr, vbs, rearm, restart, servers, datacenter,