cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
enginestar
Fanfold Paper
Posts: 10
Registered: ‎07-29-2017
Location: GB
Views: 421
Message 1 of 5

How do I get my Windows product key?

I saw another post and they suggested I download a software tool.

I'm sceptical about everything... and never want to download and run anything that I don't need to.

 

How else can I find out my key?

 

Thanks.

jack860
802.11n
Posts: 190
Registered: ‎03-02-2017
Location: US
Views: 386
Message 2 of 5

Re: How do I get my Windows product key?

Downloading a tool is the only way to obtain the windows key. If you need it in order to reload your PC, it can now be done without the use of a key once you are using a microsoft account to log into the PC.

 

After the reload and you connect to the internet, windows will automatically activate.

Ricka0
Paper Tape
Posts: 3
Registered: ‎08-23-2018
Location: US
Views: 317
Message 3 of 5

Re: How do I get my Windows product key?

You can find your Windows product key using the following powershell script:

function Get-WindowsKey {
    ## function to retrieve the Windows Product Key from any PC
    ## by Nedim Mehic
    param ($targets = ".")
    $hklm = 2147483650
    $regPath = "Software\Microsoft\Windows NT\CurrentVersion"
    $regValue = "DigitalProductId"
    Foreach ($target in $targets) {
        $productKey = $null
        $win32os = $null
        $wmi = [WMIClass]"\\$target\root\default:stdRegProv"
        $data = $wmi.GetBinaryValue($hklm,$regPath,$regValue)
        $binArray = ($data.uValue)[52..66]
        $charsArray = "B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"
        ## decrypt base24 encoded binary data
        For ($i = 24; $i -ge 0; $i--) {
            $k = 0
            For ($j = 14; $j -ge 0; $j--) {
                $k = $k * 256 -bxor $binArray[$j]
                $binArray[$j] = [math]::truncate($k / 24)
                $k = $k % 24
            }
            $productKey = $charsArray[$k] + $productKey
            If (($i % 5 -eq 0) -and ($i -ne 0)) {
                $productKey = "-" + $productKey
            }
        }
        $win32os = Get-WmiObject Win32_OperatingSystem -computer $target
        $obj = New-Object Object
        $obj | Add-Member Noteproperty Computer -value $target
        $obj | Add-Member Noteproperty Caption -value $win32os.Caption
        $obj | Add-Member Noteproperty CSDVersion -value $win32os.CSDVersion
        $obj | Add-Member Noteproperty OSArch -value $win32os.OSArchitecture
        $obj | Add-Member Noteproperty BuildNumber -value $win32os.BuildNumber
        $obj | Add-Member Noteproperty RegisteredTo -value $win32os.RegisteredUser
        $obj | Add-Member Noteproperty ProductID -value $win32os.SerialNumber
        $obj | Add-Member Noteproperty ProductKey -value $productkey
        $obj
    }
}

 Source: https://nedimmehic.org/2017/02/17/how-to-find-windows-product-key-allversions-of-windows/

enginestar
Fanfold Paper
Posts: 10
Registered: ‎07-29-2017
Location: GB
Views: 309
Message 4 of 5

Re: How do I get my Windows product key?

oooh

very nice

1000% prefer a shell script where i can see what's happening - instead of blindly running some program for which i have no idea what 'else' it might do.

 

i'll report back after running

Ricka0
Paper Tape
Posts: 3
Registered: ‎08-23-2018
Location: US
Views: 247
Message 5 of 5

Re: How do I get my Windows product key?

Look forward to your feedback!

Check out current deals!


Shop current deals

Top Kudoed Authors