I needed to do this today because I had setup a pair of servers and it turns out they needed to be Datacenter edition instead of Standard edition. What used to mean you would need to rebuild, is really now just another command to run.
dism /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula
It took about 20 minutes or so but Before you tell me I posted my keys … sorry but it’s the KMS client key from Microsoft.
I found this command from ITechLounge.