By default, Windows allows sysprep /generalize to run only 3 times before refusing with a fatal error. Microsoft's official guidance is to reinstall. But when you're maintaining a golden image that needs periodic updates, that's not practical.
The fix — reset the Sysprep counter:
- Open
regeditand navigate to:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform - Set
SkipRearmto 1 - Navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus - Set
CleanupStateto 2 - Set
GeneralizationStateto 7 - Run
msdtc -uninstallthenmsdtc -install - Sysprep is now reset and can run again
Modern approach: Rather than repeatedly sysprepping the same image, use a layered imaging strategy: maintain a thin base image and apply customizations via task sequences (MECM), provisioning packages (PPKG), or DSC (Desired State Configuration). This reduces the need for frequent sysprep runs.
For Windows 10/11: Microsoft has improved the sysprep limit in recent builds, but the registry reset method still works when needed.