If you purchased a new Windows PC preinstalled in recent years (Windows 10, or Windows 8), you may have noticed some changes to the outside of your device.
The most prominent change is the absence of the product key that existed in the holistic Certificate of Authenticity (COA) sticker on computers that had pre-installed Windows 7 or earlier versions of Microsoft's operating system.
From Windows 8 onwards, this information is no longer in the COA, but it is embedded in the BIOS. So if after format reinstall the same version of Windows that came with your computer, it should be turned on automatically.
If you still want to capture this product key in your operating system, it is easy enough to do so.
Open a PowerShell window and run the following command:
(Get-WmiObject -query 'select * from SoftwareLicensingService'). OA3xOriginalProductKey
If you do not see something displayed, it means that your system does not include the Windows key in the BIOS, as is often the case with home computers, devices that use OEM System Builder, or those originally sold with a Windows 10 license.
Network administrators that manage licenses using key management services can have information about computers on their network using a different set of options for the same PowerShell command.
To see all the details about the current license status of a machine, use the following command:
Get-WMIObject -Class SoftwareLicensingService | Select-Object -Property *
(Be sure to include the asterisk at the end of this command.)
To save the key, click the PowerShell window, drag the mouse pointer over the entire 25 character key, and then right-click.
Although you will not see a dialog open, the characters you chose have already been copied to the Clipboard. Paste the key into a text file and save it in a safe place.