dism /online /set-edition:ServerDatacenter /productkey:<Datacenter key, e.g. AAAAA-BBBBB-CCCCC-DDDDD-EEEEE> /AcceptEula
Note: You can't just type in a Datacenter key in the Windows Activation control panel dialog box to upgrade--you will receive an error.
You can always check your current version, and the versions you can upgrade to, by using DISM as shown below:
dism /online /get-currentedition
dism /online /get-targeteditions
This server can't be a domain controller (DC) and would need to be demoted prior to perform the version upgrade using DISM. See also, "Q. Can I upgrade to " Standard from Windows Server 2008 Datacenter or Windows Server 2008 R2 Datacenter?