How to find and backup your Windows 10 license key

There are three ways you can view your Windows license key, that I know of (without third-party software).

Computer with preinstalled Windows (BIOS license)

If you have a consumer computer shipped with a built-in Windows key it is likely that the key resides in the BIOS.

In this case, you can run the following command in CMD to view the key:

wmic path softwarelicensingservice get OA3xOriginalProductKey

If you do not have a license in BIOS you will get OA3xOriginalProductKey as a result. If you do have the key in BIOS you will get the same result, but followed by your 25-digit Windows license key.

Custom built computer

You might not have a BIOS license key. For example, if you are running a virtual machine, if you have a digital license linked to your Microsoft account, or if you have built the computer yourself and later activated Windows.

In any of those cases, you will have to either use a VBscript or third-party software to reveal the registered key.

If you just want a small and clean software to do this I recommend Nirsoft’s Product Key. But why use software if you can just make a script for yourself?

You can copy and save the VBscript below. All it does basically is to get the license key stored in the registry under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId and convert it from HEX to text and ask if you want to save it.

If you use the VBscript on a computer that actually has a BIOS key you will get the same result as if you ran the wmic command above. So it is up to you which one you choose.

Computer connected to a corporate license server

If you have a license server, usually in an enterprise environment, you can get the MAK or KMS key with the slmgr.vbs command.

I can confirm that this works after testing it on my corporate computers.

Start by checking if the computer is actually activated with:

cscript "%windir%\system32\slmgr.vbs" /xpr

Here are the possible results you will get:

Windows is in Notification mode means Windows cannot activate because it cannot connect to the activation server.

Volume activation will expire 01.01.2020 12:34:10 is usually something you get if you have an active KMS license, so this means that your computer is actually activated. The date is when your KMS HOST key will expire (server license), not confused with the KMS client key. Read more about different types of licenses here.

The machine is permanently activated. This one is self-explanatory, but note that you won’t get this message on a KMS or MAK-activated computer. This behavior is normal so don’t worry if you don’t see this message on a KMS/MAK activated computer.

Tip: Don’t forget that you can also use slmgr it to get detailed information about your Windows license.

Running cscript "%windir%\system32\slmgr.vbs" /dli or cscript "%windir%\system32\slmgr.vbs" /dlv will give you even more detailed license info. If you want more info, be sure to read some good info at ss64.

Oh, and just a quick tip: If you want the output of slmgr to print in CMD instead of a message box, use:

cscript "%windir%\system32\slmgr.vbs"

instead of just slmgr.vbs and all the output will appear in the command prompt. Took me a while to figure that one out. 😀👍

Leave a Reply

Your email address will not be published. Required fields are marked *