2012 Server sysprep fails

2012 Server sysprep fails during MDT capture sequence

I recently experienced an issue while updating my 2012 server image on my MDT deployment share.  The newly updated 2012 Server sysprep fails during the sysprep capture process.  The MDT task sequence indicated the following sysprep error:


A review of the sysprep error log (C:\Windows\System32\sysprep\setuperr.log) revealed the following issue:

2016-06-12 11:18:21, Error      [0x0f00bf] SYSPRP CreateSysprepActionList: Invalid action node sysprepOrder found for component Microsoft-Windows-SoftwareInventoryLogging-ScheduledTasks
2016-06-12 11:18:21, Error                 SYSPRP SysprepSession::Execute: Error in executing actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x10dd
2016-06-12 11:18:21, Error                 SYSPRP RunPlatformActions:Failed while executing SysprepSession actions; dwRet = 0x10dd
2016-06-12 11:18:21, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x10dd
2016-06-12 11:18:21, Error      [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x800710dd

It took two days of research to track this one down and it ended up being related to the Windows Management Framework (WMF) 5.0 RTM which I was including in my image refresh.
Apparently there is a known Bug: WMF 5 Production Preview on Windows Server 2012 breaks Sysprep

In the following article: WMF 5.0 Known Issues and Limitations I discovered a workaround for this problem which I have included below.  It essentially involves modifying the Generalize.xml for sysprep to accommodate the upgrade to WMF 5.0.  I made the necessary changes and sysprep and the MDT capture sequence worked without issue.

For systems running Windows Server 2012

  1. After installing WMF 5.0 on the server to be Sysprep’d, login as administrator.
  2. Copy Generize.xml from directory \Windows\System32\Sysprep\ActionFiles\ to a location outside of the Windows directory, C:\ for example.
  3. Open your Generalize.xml copy with notepad.
  4. Find and remove the following text, one instance of each needs to be deleted (they will be near the end of the document).
    • <sysprepOrder order=”0x3200″></sysprepOrder>
    • <sysprepOrder order=”0x3300″></sysprepOrder>
  5. Save the edited copy of Generalize.xml and close the file.
  6. Open a command prompt as administrator
  7. Run the following command to take ownership of the Generalize.xml file in system32 folder: Takeown /f C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
  8. Run the following command to set appropriate permission on the file: Cacls C:\Windows\System32\ Sysprep\ActionFiles\Generalize.xml /G `<Administrator>`:F
    • Answer Yes at the prompt for confirmation.
    • Note that <AdministratorUserName> should be replaced by the username who is administrator on the machine. For example, “Administrator”.
  9. Copy the file you edited and saved over to the Sysprep directory using the following command: xcopy C:\Generalize.xml C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
    • Answer Yes to overwrite (note that if there is no prompt to overwrite, double check the path entered).
    • Assumes your edited copy of Generalize.xml was copied to C:\ .
  10. Generalize.xml is now updated with the workaround. Please run Sysprep with the generalize option enabled.


Leave a Reply

Your email address will not be published. Required fields are marked *