I ran into this while upgrading a Windows 7 image to Windows 8.1 for capture with MECM (formerly SCCM) 2012 R2. Sysprep immediately failed because upgraded installations leave behind upgrade artifacts that confuse the generalization process.
The fix:
- Open an elevated command prompt
- Run:
dism /online /cleanup-image /revertpendingactions - Reboot
- Run:
dism /online /cleanup-image /startcomponentcleanup - Clean out
C:\Windows\Panther(remove all contents) - Reset the sysprep counter (see my earlier post on that)
- Run sysprep:
sysprep /generalize /oobe /shutdown
The lesson: In-place upgrades and image capture don't mix well. If you need a capturable image, always start from a clean install. Use the upgrade path for production machines that won't be re-imaged.
Modern approach: With Windows 10/11 feature updates, in-place upgrade is now the recommended servicing model. If you need clean images, use MDT or MECM task sequences with a fresh WIM from Microsoft — don't upgrade-then-capture.