Activate Windows Server in Powershell/Command

First check editions which can be upgraded to from evaluation:

# Dism /Online /Get-TargetEditions

Then launch the activation process with:

# Dism /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:12345-67890-12345-67890-12345

Please remember to replace “Set-Edition” and “Productkey” values with your desired ones.