• 3 Simple Ways to Find Your Windows 10 Product Key

    Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10-other » 3 Simple Ways to Find Your Windows 10 Product Key

    • This topic has 9 replies, 7 voices, and was last updated 11 months ago.
    Author
    Topic
    Viewing 8 reply threads
    Author
    Replies
    • #2678112

      Or not bother because MS has it recorded and you have an image backup or two for recovery!

      cheers, Paul

    • #2678119

      Or not bother because MS has it recorded and you have an image backup or two for recovery!

      cheers, Paul

      What I found interesting was that the first two methods returned the key that I was expecting to see. But the key stored in the Registry was something completely different

      I wonder which one MS has recorded?

      1 user thanked author for this post.
    • #2678139

      The first two returned an empty OriginalProductKey value and, while the registry entry did contain a key, it was the default Win10 key that requires a digital License for activation.

      2 users thanked author for this post.
    • #2678167

      Hey Y’all,

      Here’s my results…

      My Records Show

      MinisForum UM790 Venus (Manuf. Dte: 11/20/2023) In service: 02/28/2024
      SN: MY016VU79PECMHA00047
      Win 11 Pro Key : XXXX-XXXX-XXXX-XXXX-9QBP2 {Upgrade Key}
      OEM/User Key : XXXX-XXXX-XXXX-XXXX-P7JXC
      Embedded Key : XXXX-XXXX-XXXX-XXXX-T83XB

      Method 1 Results:
      C:\Windows\System32>wmic path softwareLicensingService get OA3xOriginalProductKey
      OA3xOriginalProductKey
      XXXX-XXXX-XXXX-XXXX-T83XB

      Method 2 Results:
      XXXX-XXXX-XXXX-XXXX-T83XB
      PS>

      My PowerShell code to retrieve keys:

      
      Function Get-WindowsProductKey {
      
        param (
                [Parameter(Mandatory=$True)]
                  [string]$CompName
              )
      
        $Reg = [WMIClass] ("\\" + $CompName +
                           "\root\default:StdRegProv")
        $values = [byte[]]($reg.getbinaryvalue(2147483650,
                  "SOFTWARE\Microsoft\Windows NT\CurrentVersion",
                  "DigitalProductId").uvalue)
        $lookup = [char[]]("B","C","D","F","G","H","J","K","M",
                           "P","Q","R","T","V","W","X","Y",
                           "2","3","4","6","7","8","9")
        $keyStartIndex      = [int]52;
        $keyEndIndex        = [int]($keyStartIndex + 15);
        $decodeLength       = [int]29
        $decodeStringLength = [int]15
        $decodedChars       = New-Object char[] $decodeLength
        $hexPid             = New-Object System.Collections.ArrayList
      
        for ($i = $keyStartIndex; $i -le $keyEndIndex; $i++) {
          [void]$hexPid.Add($values[$i])
        }
      
        for ( $i = $decodeLength - 1; $i -ge 0; $i--) {
      
          if (($i + 1) % 6 -eq 0) {
            $decodedChars[$i] = '-'
          }
          else
          {
            $digitMapIndex = [int]0
            for ($j = $decodeStringLength - 1; $j -ge 0; $j--)
            {
             $byteValue = [int](($digitMapIndex * [int]256) -bor
                                 [byte]$hexPid[$j])
             $hexPid[$j] = [byte] ([math]::Floor($byteValue / 24))
             $digitMapIndex = $byteValue % 24
             $decodedChars[$i] = $lookup[$digitMapIndex]
            }
          }
        }   #End For ($i...)
      
        $WindowsKey = ''
        $decodedChars | ForEach-Object { $WindowsKey += $_ }
      
        Return ,$WindowsKey
      
      } #End Function ----------  Get-WindowsProductKey -------------
      
      #------ Main -----------
      
        Clear-Host
        $CompSysObj = Get-CimInstance -ClassName 'Win32_ComputerSystem'
        $CurOS = Get-CimInstance -ClassName 'Win32_OperatingSystem'
       
        $CurOS = Get-CimInstance -ClassName 'Win32_OperatingSystem'
        $OSKey = Get-WindowsProductKey $CompSysObj.name
      
        $CIMArgs = @{ClassName = 'SoftwareLicensingService'
                     ErrorAction = 'Stop'}
        Try { $EmbWinKey =
               (Get-CimInstance @CIMArgs).OA3xOriginalProductKey
            }
        Catch {$EmbWinKey = "N/A"}
      
        "Windows Version: $($curos.Caption)"
        "Key         : $OSKey"
        "Embedded Key: $EmbWinKey"
      

      Results:

      Windows Version: Microsoft Windows 11 Pro
      Key         : XXXX-XXXX-XXXX-XXXX-P7JXC
      Embedded Key: XXXX-XXXX-XXXX-XXXX-T83XB
      

      Neither one returns the actual key used to upgrade from Windows 11 Home to Pro!

      Moral of the story KEEP GOOD RECORDS…

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2678171

      None worked for me:

      CMD (admin) parroted the command

      Powershell (admin) returned the location prompt

      Registry did not have a backup key.

      Zig

    • #2678390

      The article is wrong in that this doesn’t give you the “current” product key, just the key that the machine shipped with. So if you upgraded from 10 Home to 10 Pro for example, the key these commands return will be the original Home key.

    • #2678427

      Ah, that explains why the first two returned a blank value on my PC.

      It wasn’t an OEM purchase but a DIY build where I had to actually purchase Windows to install it (originally Window 7 Pro, upgraded to Windows 10 Pro.)

    • #2678483

      Ah, that explains why the first two returned a blank value on my PC.

      It wasn’t an OEM purchase but a DIY build where I had to actually purchase Windows to install it (originally Window 7 Pro, upgraded to Windows 10 Pro.)

      Exactly, self-builds or devices which didn’t ship with Windows 8 or later will return blank values.

    • #2678492

      OIC – exactly my situation (home build, Win v.8.1, immediately updated to Win 10).

      Zig

    Viewing 8 reply threads
    Reply To: 3 Simple Ways to Find Your Windows 10 Product Key

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: