Run -> CMD (Administrator) -> Enter DISM /online /Get-CurrentEdition to see what your Edition ID is. If it is Evaluation, for example, Standard is usually ServerStandardEval, and the four letters behind Eval are yours Edition ID
Windows2012 Standard Edition: ServerStandard
DISM /online /Set-Edition:ServerStandard /ProductKey:QTQRR-NCB3P-7HDCX-2TXR4-8B2QD /AcceptEula
windows2016 Standard Edition: ServerStandard
DISM /online /Set-Edition:ServerStandard /ProductKey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /AcceptEula
windows2016 Datacenter Edition: ServerDatacenter
DISM /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula
Convert Windows Server 2019 Assessment to Windows Server 2019 Standard:
DISM /online /set-edition:ServerStandard /productkey: N69G4-B89J2-4G8F4-WWYCC-J464C /accepteula
Convert Windows Server 2019 Evaluation to Windows Server 2019 Datacenter Edition:
DISM /online /set-edition:ServerDatacenter /productkey:WMDGN-G9PQG-XVVXX-R3X43-63DFG /accepteula