Open the command prompt and navigate to %windir%\System32 directory
slmgr.vbs -cpky (this clears the KMS entry you may have)
slmgr.vbs -upk (this removes any product key installed)
slmgr.vbs -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (where the x’s are the new product key you want to use)
slmgr.vbs -ato (this activates the server)
Type slmgr.vbs for further options….