This post describes how to fix the error “Sysprep was not able to validate your Windows installation.
Review the log file at
%WINDIR%\System32\Sysprep\Panther\setupact.log for details. After resolving the issue, use Sysprep to validate your installation again”:
which can occur when you run the System Preparation Tool 3.14 on Windows 11.
Cause
Open the Panther folder in the Sysprep directory, copy the setupact.log file out of that directory to open it, then scroll to the bottom to see the error:
Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
Just above this, you can see the cause, in this case, it’s Microsoft.OneDriveSync package:
SYSPRP Package Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Resolution
I removed the packages causing sysprep to an error in PowerShell ISE by running the following script:
Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage
Sysprep should now run successfully: