Recuperare cheie de licenta Windows 8 si Windows 8.1 cu PowerShell

Rezolvare problema (Fix IT)

Situatie

In pasii de mai jos, o sa va arat cum putem recupera cheia de licenta pentru activarea sistemului de operare Windows 8 sau Windows 8.1 Pro , fara sa folosim softuri aditionale!

Solutie

Pasi de urmat

Creezi un document text pe desktop in care copiezi textul de mai jos si apoi il salvezi cu denumirea RecoveryKey.ps1 

function Get-WindowsKey {
## function to retrieve the Windows Product Key from any PC
param ($targets = “.”)
$hklm = 2147483650
$regPath = “SoftwareMicrosoftWindows NTCurrentVersion”
$regValue = “DigitalProductId4″
Foreach ($target in $targets) {
$productKey = $null
$win32os = $null
$wmi = [WMIClass]”$targetrootdefault: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
}
}
Get-WindowsKey localhost

 

Deschizi aplicatia PowerShell cu run as administrator

Windows PowerShell

si scrii in linia de comanda Import-Module spatiu

Windows PowerShell import module

Acum cu tasta Shift apasata dai clik dreapta pe fisierul RecoveryKey.ps1 si selectezi din fereastra deschisa Copy as Path

Windows PowerShell import module copy patch

Acum dai un clik pe liniuta de cursor in powershell si dai click dreapta exact pe cursor sa pastezi ce ai selectat.

Windows PowerShell import module copy patch click dreapta

Apoi stergi ghilimelele aparute la inceput si sfarsit si la sfarsitul fisierului pui “;” (punct si virgula)

Apoi tasta spatiu si scrii Get-WindowsKey si dai Enter.

Windows PowerShell import module copy patch click dreapta get windows key

 

Va aparea si Product ID si Product Key

Windows PowerShell import module copy patch click dreapta get windows key enter

Tip solutie

Workaround

Plan de restaurare in caz de nefunctionare

In cazul in care avem urmatoarea eroare:

Windows PowerShell error key

trebuie sa rulam urmatoarea comanda:

Windows PowerShell error key remotesigned

Voteaza

(56 din 142 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?