I experienced this issue when working on a particular platform, it was a weird one so thought I would document it.
I tried to deploy a VMware VM from a Windows 2008 R2 Template which had PowerShell 5.1 installed – Windows Management Framework (WMF) 5.0, however OS customisation would not complete. I tried to manually run sysprep within Windows too but that failed. Looking at the sysprep logs showed the error…
“Sysprep_Generalize_MiStreamProv: **** [gle=0x00000002]”
The fix was adding a registry entry to the Windows 2008 R2 Template.
Open regedit and navigate to
Create a DWORD named
LastFullPayloadTime and with the value