Azure Virtual Desktop – Sys Prep Before Capture – Sysprep was not able to validate your Windows installation

Running the sysprep command on a VM before Capture

sysprep.exe /oobe /generalize /mode:vm /shutdown

Produced 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.

 

Looking at setupact.log after fixing the security permissions on the file showed 

Error                 SYSPRP Package Microsoft.OneDriveSync_22186.904.1.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.

Run this

Remove-AppxPackage -Package ‘Microsoft.OneDriveSync_22186.904.1.0_neutral__8wekyb3d8bbwe’ -AllUsers

Try again , I had another Package to remove : Microsoft.OneDriveSync_22207.1002.3.0_neutral__8wekyb3d8bbwe

 

Then I was able to Sysprep

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...