Sysprep
Cheat sheet · https://pcornel.dk/topic.php?topic=3562
Answer
Sysprep generalizes a Windows installation (sysprep /generalize /oobe /shutdown) so a template can be cloned with new SIDs and computer names. An unattend.xml answer file automates the first-boot setup.
Remember
- Windows limits how many times an image can be rearmed.
First checks
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown— generalize WindowsGet-Content C:\Windows\System32\Sysprep\Panther\setupact.log— sysprep logGet-AppxPackage -AllUsers | ? PackageUserInformation -match Installed— provisioned apps blocking sysprep
Verify in this order
installed Windows → sysprep generalize → shut down → template
Where it usually breaks
First mismatch in guest/app quiescence → hypervisor snapshot/template task → metadata/backing chain → storage durability → restore/clone read-back; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3562