- Immediately upon first login to Windows 10, disable the downloading of promoted Microsoft Store apps as described here.
- On Windows 10, remove any unwanted AppX packages installed from the Microsoft Store. Some scripts to do this can be found at this 3rd party link and , this other link, or this other link. This will
- Save disk space
- Prevent issues with sysprep failing. If sysprep fails due to a Microsoft Store app, use the following steps to remove the offending apps causing sysprep to fail before trying again.
- Check %windir%\system\sysprep\panther\setuperr.log for errors like the ones below and note the name of the app.
Open a PowerShell console session and run the following command to remove the app in question, where "<MyApp>" is the name of your app referenced in setuperr.log.
Get-AppxPackage -name *<MyApp>* | Remove-AppxPackage
- On Windows 10, do NOT create any additional local user accounts on the reference machine. If you want to add any other accounts add them via your sysprep answer file.
- Install a custom FileWave client. Follow the instructions here for obtaining a custom FileWave client.
- Update the OS with the latest Windows patches.
- Check that the VM is not joined to a domain. If it is joined to a domain, unjoin it from the domain and reboot to make the change effective.
Run chkdsk. This speeds up the disk imaging process so that Windows does not run chkdsk after the disk image is restored.
chkdsk /f /r
- Take a VM snapshot of your reference VM.
Open a CMD window with admin privileges and sysprep the VM with the sysprep answer file you created earlier. Note that sysprep XML answer files are Windows version specific so an answer file for Windows 10 will not work on Windows 7. The VM will shut down after the system has been sysprepped.
Code Block linenumbers true
cd \Windows\System32\Sysprep sysprep.exe /generalize /oobe /shutdown /unattend:c:\fully\qualified\path\to\sysprep_answer_file.xml
- Take another snapshot of the VM after it has shut down after being sysprepped.