While running sysprep:
The following errors are observed in the `C:\Windows\System32\Sysprep\Panther\setuperr.log` file:
C:\Windows\System32\AppxSysprep.dll; dwRet = 0x422 Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.`These errors typically occur due to two primary reasons:
1. Service State (0x422):** The `AppXSvc` (AppX Deployment Service) is disabled. Sysprep requires this service to be in a Manual or Automatic start state to validate and clean up AppX packages during the generalize phase
2. Package Conflict (0x80073cf2):** Certain Microsoft Store (AppX) applications are installed for a specific user but are not provisioned for all users, or are flagged as "protected" (Inbox) apps that cannot be removed by standard commands
To resolve these issues, follow the steps below on the base image before converting it to a template :
3): reg add "HKLM\SYSTEM\CurrentControlSet\Services\AppXSvc" /v "Start" /t REG_DWORD /d 3 /fAlternatively, use the GUI to modify the service startup type :
windows+r key and type regeditHKLM\SYSTEM\CurrentControlSet\Services\AppXSvc
Once the service is enabled, run Sysprep:
This command will make changes to your system. Review it carefully before running.
To reboot the system from the command prompt:
C:\Windows\System32\Sysprep\sysprep.exe /generalize /oobe /shutdown
If Sysprep fails again, re-examine the `setuperr.log` for any additional packages that may need to be removed.
Refer to KB articles for sysprep log files.
Locations of sysprep log files
Customization Specification for Windows does not join VM to domain