I want to keep rearming Windows Server 2016 pass it's maximum rearm count period. I don't mind touching the registry as this is for a lab. Can someone tell me how to do it on Windows Server 2016?
Rearm is only usefull to reset any Initial Grace Period in Win 7 (the 30 days) and the Activation Grace Period in EVAL versions (limitted). In Win 8/Server 2012 and later non-EVAL versions there is no such Grace that can be resetted hence the Rearm is deprecated . EDIT: Next time you might add that you use the EVAL (saw it in your reddit post). Iirc the rearm count cannot be resetted on EVALs, unlike Win 7 .
This is evaluation and I know it can be done because I did it for another Server 2016....I just don't remember how.
See my edit. You can't reset the rearm count on any EVAL without patching the kernel (same applies for the timebomb on IP builds) . You can convert EVAL to normal version on Server (in opposite to the client versions). Still that would need activation afterwards.
Windows 10 (and server probably) can have the rearm count reset almost the same way it is done in Windows 7. The difference is that you need to do the process from Windows PE or from Recovery environment and need to empty C:\Windows\system32\spp\store\2.0 directory.
Does that also apply for EVAL Grace Reset? For normal versions there is no gain in doing so. How to exceed 1001 rearms for no reason?
Not sure what you mean exactly... @s1ave77 said it was not possible while you are saying it is. I dont understand why he needs information. Did I miss something?
For Windows 7 and Win 10 upto build 14393, so includes Server 2016 and LTSB 2016, try this (will reboot which is mandatory): Code: @echo off set /p "Sure=Are you sure you want to continue (y/N)? " if /I "[%Sure%]" == "[y]" goto :START_PROCESS goto :EOF :START_PROCESS echo Please wait... sc stop sppsvc reg add HKCU\SYSTEMM\WPA /ve /f REG SAVE HKCU\SYSTEMM "%TEMP%\SYSTEM.HIV" /y >NUL 2>&1 REG RESTORE HKLM\SYSTEM "%TEMP%\SYSTEM.HIV" >NUL 2>&1 reg delete HKCU\SYSTEMM /f del "%TEMP%\SYSTEM.HIV" >NUL 2>&1 for /f %%i in ('reg query HKLM\SYSTEM\WPA') do reg delete "%%i" /f ::Windows 10 if exist "%systemdrive%\Windows\System32\spp\store\2.0\cache" ( attrib -s -h "%systemdrive%\Windows\System32\spp\store\2.0\cache" rmdir /q /s "%systemdrive%\Windows\System32\spp\store\2.0\cache" ) if exist "%systemdrive%\Windows\System32\spp\store\2.0\data.dat" ( attrib -s -h "%systemdrive%\Windows\System32\spp\store\2.0\data.dat" del "%systemdrive%\Windows\System32\spp\store\2.0\data.dat" ) if exist "%systemdrive%\Windows\System32\spp\store\2.0\tokens.dat" ( attrib -s -h "%systemdrive%\Windows\System32\spp\store\2.0\tokens.dat" del "%systemdrive%\Windows\System32\spp\store\2.0\tokens.dat" ) ::Windows 7 if exist "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" ( attrib -s -h "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" del "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" ) if exist "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" ( attrib -s -h "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" rmdir /q /s "%systemdrive%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" ) shutdown -r -t 0 goto :EOF :EOF save as rearm.cmd and run as admin.
@s1ave77 Careful mate. If @riahc3 doesn't like your script or it doesn't work according to him he will call it a f**kery.
Nah, actually all this started with the old Win 7 Rearm Project and was revisited and adapted by others, i only collected the bread crumbs. For the sake of completeness (the forementioned version only supports Win 7 and Win 10 till build 14393) a version that will rearm Win 7/8.1/10 offline (needs to be performed from Win PE): Code: @echo off set "TargetLetter=" for %%a in (Z Y W V U T S R Q P O N M L K J I H G F E D C) do ( if exist "%%a:\Windows\system32\config\SYSTEM" set "TargetLetter=%%a:" ) if "[%TargetLetter%]" == "[]" echo Cannot find target system & exit /b 1 echo list volume | diskpart echo. echo Detected system on %TargetLetter% set /p "Sure=Are you sure you want to continue (y/N)? " if /I "[%Sure%]" == "[y]" goto :START_PROCESS goto :EOF :START_PROCESS REG LOAD HKLM\TEMP "%TargetLetter%\Windows\system32\config\SYSTEM" for /f %%i in ('reg query HKLM\TEMP\WPA') do reg delete "%%i" /f REG UNLOAD HKLM\TEMP ::Windows 10 ClipSVC if exist "%TargetLetter%\ProgramData\Microsoft\Windows\ClipSVC\tokens.dat" ( attrib -s -h "%TargetLetter%\ProgramData\Microsoft\Windows\ClipSVC\tokens.dat" del "%TargetLetter%\ProgramData\Microsoft\Windows\ClipSVC\tokens.dat" ) ::Windows 10 Insider if exist "%TargetLetter%\Windows\System32\spp\store_test\2.0\cache" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store_test\2.0\cache" rmdir /q /s "%TargetLetter%\Windows\System32\spp\store_test\2.0\cache" ) if exist "%TargetLetter%\Windows\System32\spp\store_test\2.0\data.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store_test\2.0\data.dat" del "%TargetLetter%\Windows\System32\spp\store_test\2.0\data.dat" ) if exist "%TargetLetter%\Windows\System32\spp\store_test\2.0\tokens.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store_test\2.0\tokens.dat" del "%TargetLetter%\Windows\System32\spp\store_test\2.0\tokens.dat" ) ::Windows 10/8.1 if exist "%TargetLetter%\Windows\System32\spp\store\2.0\cache" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\2.0\cache" rmdir /q /s "%TargetLetter%\Windows\System32\spp\store\2.0\cache" ) if exist "%TargetLetter%\Windows\System32\spp\store\2.0\data.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\2.0\data.dat" del "%TargetLetter%\Windows\System32\spp\store\2.0\data.dat" ) if exist "%TargetLetter%\Windows\System32\spp\store\2.0\tokens.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\2.0\tokens.dat" del "%TargetLetter%\Windows\System32\spp\store\2.0\tokens.dat" ) ::Windows 8 if exist "%TargetLetter%\Windows\System32\spp\store\cache" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\cache" rmdir /q /s "%TargetLetter%\Windows\System32\spp\store\cache" ) if exist "%TargetLetter%\Windows\System32\spp\store\data.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\data.dat" del "%TargetLetter%\Windows\System32\spp\store\data.dat" ) if exist "%TargetLetter%\Windows\System32\spp\store\tokens.dat" ( attrib -s -h "%TargetLetter%\Windows\System32\spp\store\tokens.dat" del "%TargetLetter%\Windows\System32\spp\store\tokens.dat" ) ::Windows 7 if exist "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" ( attrib -s -h "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" del "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\tokens.dat" ) if exist "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" ( attrib -s -h "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" rmdir /q /s "%TargetLetter%\Windows\ServiceProfiles\NetworkService\AppData\Roaming\Microsoft\SoftwareProtectionPlatform\cache" ) goto :EOF :EOF Give it a short name like rearm.cmd and copy it to the root of your Windows Drive/Partition. Boot any Windows ISO and in first screen hit Ctrl+F10 to get the CMD prompt, than enter: Code: echo list volume | diskpart This will show all available partitions. Choose your Windows drive letter (according to shown info) and enter: Code: x:rearm 'X' being the actual drive letter. It's without any \.
The online script works great. Really good for testing long lab environments. I also ran it on Server 2019 and it works as well. Thank you.