Advertisement
About80Ninjas

activate windows

Jan 8th, 2016
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $KmsServer = 'servername'
  2. $map = 'BCDFGHJKMPQRTVWXY2346789'
  3. $value = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').digitalproductid[0x34..0x42]  
  4. $ProductKey = ''  
  5. for ($i = 24; $i -ge 0; $i--)
  6. {
  7.     $r = 0
  8.     for ($j = 14; $j -ge 0; $j--)
  9.     {
  10.         $r = ($r * 256) -bxor $value[$j]
  11.         $value[$j] = [math]::Floor([double]($r/24))
  12.         $r = $r % 24
  13.     }
  14.     $ProductKey = $map[$r] + $ProductKey
  15.     if (($i % 5) -eq 0 -and $i -ne 0)
  16.     {
  17.         $ProductKey = '-' + $ProductKey
  18.     }
  19. }
  20.  
  21. slmgr.vbs -skms $KmsServer
  22. slmgr.vbs /ipk $ProductKey
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement