Change Windows product key from command line and activate it

Sometimes, when I want to change the product key on Windows Server 2016, I can't do it because nothing happens when I click the link in the activation Settings. If this happens I use slmgr.vbs from the command line to Change the key and activate it online. Use the following command to change the product key: slmgr.vbs /ipk ABCDE-FGHIJ-KLMNO-PQRST-UVWXY And this command to activate it online: slmgr.vbs /ato The following site has a lot of examples on how to use slmgr.vbs: