Skip to content

Instantly share code, notes, and snippets.

@jpluimers
Forked from mimicscott/slmgr.bat
Created October 20, 2024 10:42
Show Gist options
  • Save jpluimers/611504e24b6b12e5f9350464c73158d2 to your computer and use it in GitHub Desktop.
Save jpluimers/611504e24b6b12e5f9350464c73158d2 to your computer and use it in GitHub Desktop.
Reset Windows Activation to pre-key state
:: Open a command prompt as an Administrator.
:: Enter slmgr /upk and wait for this to complete. This will uninstall the current product key from Windows and put it into an unlicensed state.
:: Enter slmgr /cpky and wait for this to complete. This will remove the product key from the registry if it's still there.
:: Enter slmgr /rearm and wait for this to complete. This is to reset the Windows activation timers so the new users will be prompted to activate Windows when they put in the key
slmgr /upk
pause
slmgr /cpky
pause
slmgr /rearm
pause
slmgr /ipk 7BNJT-PXJR8-J9G6D-DHJVQ-DV3KQ
pause
slmgr /ato
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment