If you having issues upgrading a trial release of Windows Server 2016 to a purchased licence run this command. It will take some time, so be patient. It will run thru the first few steps quickly then stop at 10% for up to 3- 4 hours depending on the server. Also check that the Windows License Manager Service is running!
Set-Edition for the type of Software Installed
ProductKey for the licence key
Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXX-dli