Windows Software Licensing Management Tool (slmgr). This is a visual basic script used to configure licensing on any Windows OS – either the full version or the core version.
Open Command Prompt under Administrator privilege then types slmgr.vbs /? to see what slmgr.vbs can provide.
Click on OK button repeatedly to see the next command
Check your current license state by typing slmgr.vbs /dli if your computer never activates before, you will get the error.
Install Microsoft Product Key
Let’s see how to install and activate your Windows License, type slmgr.vbs /ipk <Product Key> , ipk mean (Install Product Key)
e.g. slmgr.vbs /ipk #####-#####-#####-#####-##### (replace ### with your real product key)
Verify your product key is correct otherwise you will get this error.
The correct Product Key after you installed. Microsoft recommends should restart computer after installing the key.
Activate Windows Online
To force Windows to attempt an online activation, run the following command.
Activate Windows Offline
This tool also allows you to perform an offline activation. First, you need to get the Installation ID by typing the command below:
Then call the Microsoft Licensing Activation Center, provide them the Installation ID you got before and you will be given an Activation ID, use this Activation ID to active your MS Windows License without the internet connection.
Type slmgr.vbs /atp <Activation ID> replace the real Activation ID that you received from MS.
Verify your license status, slmgr.vbs /dli
Uninstall the Product Key
slmgr.vbs also allows you to uninstall the current license in case you need to take advantage of it. The command below will show you how to do that. Once the license was removed your computer will get back to Windows not activation status.
slmgr.vbs /upk (upk mean Uninstall Product Key)
Remotely Activate or Remove
slmgr.vbs also allows you to perform via remotely. I think this is very useful for Administrator who working in an enterprise environment.
slmgr.vbs computername or IP Address username password /option
e.g. slmgr.vbs 10.100.10.201 .\admin 1234aa /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Hope it helps, thank you for reading.