If you bought a new PC with Windows preinstalled in the last few years (Windows 10, or Windows 8), you may have noticed some changes to the exterior of the device.
The biggest noticeable change is the absence of the product key, which was present on the holographic Certificate of Authenticity (COA) sticker on computers that came pre-installed with Windows 7 or earlier versions of Microsoft's operating system.
Starting with Windows 8, this information is no longer on the COA, but is built into the BIOS. So if you reinstall the same version of Windows that came with your computer after formatting, it should activate automatically.

If you still want to record this product key for your operating system, it's quite easy to do.
Open a PowerShell window and run the following command:
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey
If you don't see anything displayed, it means your system doesn't include the Windows key in the BIOS, as is often the case with home computers, devices using the OEM System Builder, or those that were originally sold with a Windows 10 license.
Network administrators who manage licenses using Key Management Services can get information about the 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 command below:
Get-WMIObject -Class SoftwareLicensingService | Select-Object -Property *
(Make sure you include the asterisk at the end of this command.)
To save the key, click in the PowerShell window, drag the mouse pointer over the entire 25-character key, and then right-click.
Although you won't see a dialog box open, the characters you selected have already been copied to the Clipboard. Paste the key into a text file and save it in a safe place.
