Skip to content

Instantly share code, notes, and snippets.

@danaugustin
Created May 24, 2018 23:19
Show Gist options
  • Save danaugustin/4e47134ffa824e991e28f37432fc98f8 to your computer and use it in GitHub Desktop.
Save danaugustin/4e47134ffa824e991e28f37432fc98f8 to your computer and use it in GitHub Desktop.
$key=(Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductKey
iex "cscript /b C:\windows\system32\slmgr.vbs /upk"
iex "cscript /b C:\windows\system32\slmgr.vbs /ipk $key"
iex "cscript /b C:\windows\system32\slmgr.vbs /ato"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment