How to find your Windows product key from the registry and PowerShell
Windows can be activated without exposing a reusable product key. A key is the 25-character code issued with a retail, OEM or volume licence; activation is evidence that the installed edition is authorised. Microsoft Store and many OEM licences use digital entitlements, so a successful activation does not guarantee that the original code can be recovered. Check activation before trying to reinstall or purchase another licence.
The workflow below uses read-only PowerShell and registry checks on Windows 10 or 11, then explains where a genuine key may be recovered. Open Windows Terminal or PowerShell as administrator, and keep identifiers out of public forums and marketplace listings. That precaution is especially relevant in Australia, where the Privacy Act 1988 and Australian Privacy Principles govern how many organisations handle personal information.
Understand what Windows stores
Product keys and activation records serve different purposes. The key identifies an edition and channel, while the licence record proves that a device or account is entitled to use it. A generic key printed on packaging may install an edition but fail to activate it. A digitised product key can also be tied to a particular hardware fingerprint. The same characters can therefore be valid for installation yet unavailable for another device.
Licences usually originate in one of three places. An OEM key is embedded in a computer supplied by a manufacturer. A retail key is sold by a retailer or authorised dealer. A volume licence is assigned to an organisation through KMS or subscription activation. Digital Store purchases attach the entitlement to a Microsoft account and hardware, which is why there may be no separate key to find. Record the edition and channel, because a key for one edition does not authorise another.
Confirm that Windows is activated
Start with Windows’ own activation report. In an elevated PowerShell session, run the following; a dialog should report that Windows is activated and may offer a way to activate the product.
slmgr.exe /xpr
For more detail, use slmgr.exe /dlv to inspect the installed edition, channel and partial key, or open Settings and select System, then Activation. The /dlv report also helps distinguish a local licence from KMS; a server URL under KMS is not evidence that the machine is improperly activated. If Windows is activated, do not alter the registry merely to force a key to appear. A missing full key is normal on many digital and OEM installations.
Query licensing details with PowerShell
PowerShell provides a richer view through the SoftwareLicensingProduct WMI class. Run this read-only query:
Get-CimInstance -ClassName SoftwareLicensingProduct |
Where-Object {
$_.ApplicationID -eq '55c92734-d682-4d71-983e-d6ec3f16059f'
} |
Select-Object Name, Description, ProductKeyChannel,
PartialProductKey, LicenseStatus, GracePeriodRemaining
Focus on the row matching the installed edition. LicenseStatus equal to 1 means licensed, while PartialProductKey generally exposes only the final five characters. It is useful for matching a receipt but cannot by itself reactivate Windows. ProductKeyChannel can distinguish a retail, OEM or volume channel, although a channel label is not proof of where the licence was purchased. Run the query before and after any repair to see whether the edition, channel or status actually changed.
A companion query may reveal the OEM key descriptor, such as “System Firmware”, but it does not expose the full key:
Get-CimInstance -ClassName SoftwareLicensingService |
Select-Object OA3xOriginalProductKeyDescription
An empty result is common when firmware does not publish an OEM key or the machine uses a digital licence. It is a reason to check the manufacturer or Microsoft account, not a sign that Windows is improperly activated.
Inspect the registry safely
The licensing registry can contain a full key on some installations, but it can also contain only a default fallback. For a manual view, run regedit and follow HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform. The PowerShell route below checks both native and 32-bit registry views:
$platformPaths = @(
'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform',
'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform'
)
$platformPaths |
Where-Object { Test-Path -LiteralPath $_ } |
ForEach-Object {
Get-ItemProperty -LiteralPath $_ |
Select-Object PSPath, BackupProductKeyDefault, BackupProductKey
}
BackupProductKey may hold a complete key on certain OEM or enterprise installations. BackupProductKeyDefault is a fallback maintained by Windows and may be a public default rather than your purchase key. Compare any candidate with the invoice, edition and channel before using it. If both values are blank, the licence is likely digital, KMS-managed or protected by policy. Although registry-stored keys are not passwords, they can still represent sensitive entitlement data.
The neighbouring DigitalProductId value is another common source people quote. Read it without editing it:
$currentVersion = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
$digitalId = Get-ItemProperty -LiteralPath $currentVersion -Name DigitalProductId
$digitalId.DigitalProductId | Format-Hex
A byte array or hexadecimal output is expected. Do not interpret the bytes as characters, and do not delete the value to try to reset licensing. Exporting this blob into a support request can disclose device identifiers, so redact unrelated data.
Interpret DigitalProductId results
DigitalProductId is an encoded binary product identifier, not a plain-text licence field. Its format is an implementation detail rather than a supported export contract, and the bytes can vary between Windows releases. Some scripts published online decode those bytes into a plausible 25-character key, but they should be treated as diagnostic tools rather than guaranteed extraction methods.
A decoded result should be checked against slmgr /dlv, the edition reported by PowerShell and the purchase record before attempting activation. A generic fallback, the wrong edition or an outdated decoder can all produce something convincing. Some community decoders are simply obsolete reimplementations of undocumented behaviour and can misread newer byte layouts. Do not replace working licensing components with a third-party tool to make a key appear.
On a modern Microsoft Store licence, the authoritative source is the order and activation history attached to the Microsoft account. On an OEM computer, the manufacturer may confirm the embedded key or issue a replacement entitlement. If the goal is to reinstall on the same computer, preserving the existing digital licence is usually safer and simpler than trying to manufacture a code from registry data.
Recover a key from purchase records
Start with Microsoft’s Services or Devices page, using the account that made the purchase, and look for the relevant order and activation details. Retail orders may show a key; digital orders commonly show only the entitlement. Signing back into Windows on the same device should restore a Store or digital OEM entitlement, provided the hardware profile still matches.
For a locally purchased PC, check the box, invoice, retailer account and manufacturer support channel. Australian receipts show prices in AUD and include 10% GST, so keeping the tax invoice can make an entitlement claim easier. Whether the laptop came through JB Hi-Fi, Harvey Norman, Officeworks or Amazon.com.au for a household in Brisbane, a Melbourne studio or a Sydney office, the purchase date and serial number matter. Photographing the packaging and recording the serial number is prudent because some manufacturers use it to locate the embedded entitlement. Under the Australian Consumer Law, a seller must honour its stated promises, although the law cannot supply a key that was never issued.
Business PCs may use KMS, Active Directory volume activation or a Microsoft 365 device licence. Ask the administrator to review the organisation’s volume agreement and activation portal instead of hunting for a per-device retail key. A KMS client can show the server address with cscript.exe slmgr.vbs /dlv, but the client key is not a transferable Windows product key.
Avoid risky recovery attempts
Treat every command here as read-only. Do not import an unknown PowerShell script, edit DigitalProductId, install an “activator”, or replace system licensing files. These actions can introduce malware, violate licence terms or break a working activation. If a third-party decoder is used, inspect its source, test it on an offline copy, and never grant it administrator rights merely to decode a registry value.
Before reinstalling, confirm that Windows activates without a key after the reset and record the edition, channel, partial key and activation status. For a fresh drive, verify that the same Microsoft account or OEM entitlement is available. If you are creating a full image first, compare legitimate backup utilities in the Windows software catalogue, then download only from the verified publisher or its official site.
Activation checks depend on accurate time. After daylight-saving changes in New South Wales, Victoria, South Australia or Tasmania, set time automatically; Queensland does not shift its clocks. A correct local clock avoids one avoidable cause of failed online validation.
Run the activation and CIM checks now, then store the results with your invoice or account details. If you need a reusable key for a clean reinstall, obtain it from Microsoft, the OEM or the authorised retailer, and confirm that it matches the edition and channel reported by PowerShell before entering it.
For an organisation-managed device, leave key recovery to the software administrator and use the volume activation record instead. Keep the final key in a password manager or another protected record, never in a public spreadsheet, and complete the reinstall while the original entitlement remains linked to the device.