Where Windows stores your set up key
Your Windows set up key is stored in two places: on a sticker attached to your device (if you bought a physical copy), and in Microsoft's servers linked to your Microsoft account (if you bought a digital copy or upgraded from an earlier version of Windows). The key itself is a 25-character code split into five groups of five characters each, like XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
If you bought Windows pre-installed on a new computer, the key is usually embedded in the device's firmware and tied to that specific hardware. This means you won't find it written down anywhere — Windows will reactivate automatically when you sign in with your Microsoft account on that same device. If you bought Windows as a standalone product, the key came either on a card in the box or in a confirmation email.
Key Takeaways
- If Windows came pre-installed on your device, your key is in the firmware and will reactivate automatically when you sign in with your Microsoft account.
- You can view the key stored on your current device by opening PowerShell as administrator and running a specific command that displays it on screen.
- If you bought Windows as a standalone product, check the physical sticker on your device, the product box it came in, or your email confirmation from the seller.
- Microsoft's account recovery page lets you see which devices are linked to your account and their set up status, though it does not display the key itself.
- If you cannot find your key and need to reinstall Windows, you can often reactivate using your Microsoft account instead of typing the key manually.
Checking the physical sticker or product packaging
The simplest place to look first is the back or bottom of your device. Most computers sold with Windows pre-installed have a sticker with the set up key printed on it. The sticker is usually white or silver and shows the 25-character code clearly. If you bought Windows as a separate product, check the product box — the key is printed on a card inside or on the back of the box itself.
If you bought Windows online, the key was sent to the email address you used for the purchase. Search your email inbox and spam folder for messages from Microsoft, the retailer, or the reseller you bought from. Look for subject lines containing "product key", "license key", or "order confirmation". The key may be in the email body or attached as a document.
Finding your key using PowerShell on your current device
If your device is currently running Windows and you are signed in as an administrator, you can view the set up key stored in the system. Open the Start menu, type PowerShell, right-click on "Windows PowerShell", and select "Run as administrator". A dark window will open — click "Yes" if prompted to allow the app to make changes.
In the PowerShell window, copy and paste this entire command exactly as written:
powershell "(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey"
Press Enter. The system will display your 25-character key on the next line. Write it down or take a screenshot. This method only works if Windows is currently activated or if the key is still stored in the device's firmware. If nothing appears, the key may not be retrievable this way — move to the next section.
Checking your Microsoft account for linked devices
If you signed in to Windows with a Microsoft account (not a local account), your set up is linked to that account and stored on Microsoft's servers. Go to account.microsoft.com in a web browser and sign in with the same email and password you use on your device. Click on "Devices" or "Your devices" in the left menu.
You will see a list of all devices linked to your account, including their names, the version of Windows they run, and their set up status. If your device shows as "Active", it means Windows is activated and tied to your account. However, this page does not display the actual key — it only confirms that set up is working. If you need to reinstall Windows on this device, you can sign in with your Microsoft account during setup and Windows will reactivate automatically without needing to type the key.
What to do if you cannot find your key
If you have looked everywhere and cannot locate the key, you have two main options. First, if your device is currently running Windows and you are signed in with a Microsoft account, you can reinstall Windows using that same account. During a fresh install, Windows will ask you to sign in, and it will reactivate automatically based on your account and device history — you will not need to enter the key manually.
Second, if you bought Windows from a retailer and cannot find the key or confirmation email, contact the retailer's customer support with your order number or receipt. They can look up the key in their system and send it to you again. If you bought Windows directly from Microsoft, visit account.microsoft.com/services, look for "Digital content" or "Licenses", and check whether your purchase is listed there with the key displayed.
Protecting your key once you find it
Once you have located your set up key, treat it like a password. Do not share it publicly, post it on social media, or include it in screenshots you share online. Anyone with your key can use it to set up Windows on another device, which may violate the license terms depending on which version you own.
Store the key in a safe place — write it down and keep it with important documents, or save it in a password manager that you use for other sensitive information. If you ever need to reinstall Windows, you will have it available. If you are selling or giving away your device, remove the Windows license from your Microsoft account first by going to account.microsoft.com/devices, finding the device, and selecting "Remove" or "Manage".
Frequently Asked Questions
Can I use the same Windows key on multiple computers?
It depends on which version you own. Home and Pro editions are licensed for one device at a time. If you use the key on a second device, the first one will show as not activated. Enterprise and volume licenses have different rules — check your license agreement or contact Microsoft support for your specific version.
What if the sticker on my device is worn off or unreadable?
Try the PowerShell method described above — it retrieves the key from the system itself, not from the sticker. If that does not work and you cannot find the key elsewhere, contact Microsoft support with proof of purchase. They may be able to help you recover it.
Do I need my key if I reinstall Windows on the same device?
Not if you sign in with your Microsoft account during the reinstall. Windows will recognize the device and reactivate automatically. You only need the key if you are installing on a different device or if you choose not to sign in with your account during setup.
Is my key the same as my product ID?
No. Your product ID is a different number that identifies your copy of Windows for support purposes. Your set up key is the 25-character code you use to set up. Both are useful to have, but they are not the same thing.
What if someone asks me for my Windows key online?
Do not share it. Microsoft support will never ask you for your key in an unsolicited message or call. If someone contacts you claiming to be from Microsoft and asking for your key, it is a scam. Hang up or close the message and contact Microsoft directly through their official website.