https://social.technet.microsoft.com/Forums/en-US/4238f12f-fdb3-4bb4-a4f4-f8889f0eabc3/sysprep-fail-with-sysprep-generalize?forum=winserversetup
2008R2 sysprep报错如下,首先检查有没有安装powershell5,有的话,卸载,然后重新sysprep就可以了
Error [0x0f0082] SYSPRP LaunchDll:Failure occurred while executing 'C:WindowsSystem32silsysprep.dll,Sysprep_Generalize_SilProvider', returned error code 2[gle=0x00000002]
Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 2[gle=0x00000002]
Error [0x0f00a8] SYSPRP WinMain:Hit failure while processing sysprep generalize internal providers; hr = 0x80070002[gle=0x00000002]
卸载powershell5参考
https://learn.microsoft.com/zh-cn/powershell/scripting/windows-powershell/wmf/setup/uninstall
Using Control Panel
- Open Control Panel.
- Open Programs, then open Uninstall a program.
- Click View installed updates.
- Select Windows Management Framework 5.0 from the list of installed updates.