The reason Windows 10 has started failing Sysprep when building reference images, turns out to be that the Appx update routine starts one hour after Windows 10 goes online.
It then starts downloading and staging updates for the built-in apps. It is these updates that result in Sysprep failing. It can be found in the setuperr.log
See more at: http://serverfault.com/questions/778916/sysprep-error-when-building-a-win10-reference-image/782420#782420
Since we, at my work, update both Windows AND Office we spend many hours online before Sysprep. Hence Sysprep fails.
It appears that if we, through GPEDIT, Enable
“Local Computer Policy > Administrative Templates > Windows Components > Store:
“Turn off Automatic Download and install of updates””
– the Appx app updates are NOT downloaded AND Sysprep stops failing J
But sadly there’s no way to set this locally on a Pc. Not Regedit, PowerShell or WMI….
However it turns out this is stupidly simple to work around:
Set the settings mentioned above and then the corresponding hidden folders
%systemroot%\System32\GroupPolicy\Machine and User pops up with a Registry.pol file containing these settings. (The “Machine”/”User” folder structure is not present until the first policy is set.)
Copy everything under the “%systemroot%\System32\GroupPolicy\” folder and build an application that plops the folders and files down in place followed by a “GPupdate /force”.
(I simply created an application containing a root folder “policies” with everything in it and used xcopy directly as command line. “xcopy policies %systemroot%\System32\GroupPolicy /S /I /E /V /H /Y“)
Run this “Application” at the top of the “State Restore” step in your Build TS, followed by GPupdate /force..