← All Posts

Deployment

Sysprep on an Upgraded Operating System

When you need to capture an image from an OS that was upgraded (not clean-installed), Sysprep requires special handling.

ImagingSysprepWindows

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:

  1. Open an elevated command prompt
  2. Run: dism /online /cleanup-image /revertpendingactions
  3. Reboot
  4. Run: dism /online /cleanup-image /startcomponentcleanup
  5. Clean out C:\Windows\Panther (remove all contents)
  6. Reset the sysprep counter (see my earlier post on that)
  7. 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.

Sysprep on an Upgraded Operating System — Harry Caskey