Starting from Server 2016, you can change the installed edition of windows by running the following:
DISM /online /Set-Edition:edition ID /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
The editions can be serverDatacenter or serverStandard, but this can only be used to upgrade to a higher edition (e.g. standard->datacenter).
If you have KMS set up, you can use the following keys:
Edition | Key |
---|---|
Windows Server 2016 Datacenter | CB7KF-BWN84-R7R2Y-793K2-8XDDG |
Windows Server 2016 Standard | WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY |
Windows Server 2019 Datacenter | WMDGN-G9PQG-XVVXX-R3X43-63DFG |
Windows Server 2019 Standard | N69G4-B89J2-4G8F4-WWYCC-J464C |