How can we recover the license code of Windows without using third-party applications

If you forget which is license code your system Windows and want to make a resettlement (Or want to make a backup its just in case), it is not necessary to resort to third-party applications to find out what it is. If you use a Windows recently (Windows 7, Windows 8 or Windows 8.1) You can recover license code thereof in Registry System using the following instructions.

How can we recover the license code of a Windows registry system (without using third-party applications)?

windows-product-key,en

  • give Copy / Paste The following code in a NotepadThen save the file desktop titled RecoverKey.ps1 (It is mandatory that File extension be newly created . Ps1)

function Get-WindowsKey {,en
# # Function to retrieve the Windows Product Key from any PC
# # By Jakob Bindslet (jakob@bindslet.dk)
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 binary encoded base24 date
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-eq 5 0%)-and ($ i 0 us)) {
$ ProductKey = "-" + $ productKey
}
}
$ Win32os = Get-WmiObject-computer $ target Win32_OperatingSystem
$ 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
}
}

recoverkey_ps1

  • open Windows PowerShell cu Administrator privileges (Typing PowerShell in Start Menu or Start Screen, Right click on the result and select Run as administrator)

open powershell

  • Type the following command in the open window

Set ExecutionPolicy RemoteSigned

  • When you see the question Do You want to change the execution policy? enter Y or give Enter for confirmation
  • then type the command

Import-Module C: \ Users \ PC \ Desktop \ RecoverKey.ps1, Get-WindowsKey

recover-windows-product-key

In the above command, replace C: \ Users \ user-name \ Desktop \ RecoverKey.ps1 (where user-name it is Your user name) With location where you saved the file RecoverKey.ps1, For instance C: \ Users \ Stealth_2 \ Desktop \ RecoverKey.ps1 (You can find simply holding down the file location Shift and right-click on it while, then clicking Copy as path).

You will notice that in Windows PowerShell will be displayed both ID and license code of your Windows system. Success!

STEALTH SETTINGS - How to recover your Windows Product Key without using third-party app

How can we recover the license code of Windows without using third-party applications

About the author

stealth

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment is processed.