Resolved by adding a sysprep to audit mode/reboot step, then removed the OneDrive Appx Package, then allowing the normal Capture Image group to execute.
Windows 11 MDT Sysprep Failure | OneDrive
When using an MDT Build and Capture Task Sequence (Standard Client Task Sequence), my Reference image creation fails with a sysprep error when using Windows 11 VLSC media.
The problem looks to be caused by a new UWP app included with Windows 11 for OneDrive:
Microsoft.OneDriveSync_21205.1003.3.0_neutral__8wekyb3d8bbwe
This is not present in any Windows 10 builds I have tested so looks to be a new feature introduced in Windows 11.
I have a script containing a suitable 'Remove-AppxPackage' command and this works on the appx but the app immediately reappears after a reboot during the deployment.
I can't see any related Provisioned Package (Get-AppxProvisionedPackage) to remove (which would hopefully prevent the appx from being re-provisioned) so the only workaround I have at the moment is to add the removal script (to remove the OneDrive appx) immediately before the sysprep task at the end of the Task Sequence.
Errors in the 'C:\Windows\System32\sysprep\Panther\setupact.log' are:
2021-10-14 13:37:33, Error SYSPRP Package Microsoft.OneDriveSync_21180.905.7.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2021-10-14 13:37:33, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2021-10-14 13:37:33, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2021-10-14 13:37:33, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2021-10-14 13:37:33, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2021-10-14 13:37:33, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2021-10-14 13:37:33, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2021-10-14 13:37:33, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
It looks to me like this is not intended/expected behaviour so perhaps a bug with the way the OneDrive appx is installed (i.e. 'Per User' as opposed to 'Per Device')?
Windows for business | Windows Client for IT Pros | User experience | Other
17 answers
Sort by: Most helpful
-
-
Limitless Technology 39,926 Reputation points
2021-10-20T07:22:14.033+00:00 Hello @JonathanConway-4320,
Thank you for your question.
As this is a problem related to Windows 11, I recommend that you post your question on the windows 11 forum, this way you will receive a more adequate answer.
To do this, just access the link below and select the option "Ask a question" from the top menu and then describe the entire problem, including images:
If the answer is helpful, please vote positively and accept as an answer.
-
AllenLiu-MSFT 49,316 Reputation points Microsoft External Staff
2021-10-20T08:08:17.147+00:00 Hi, @JonathanConway-4320
Thank you for posting in Microsoft Q&A forum.Here is the same issue described in the twitter, you may uninstall it from C:\Users\Administrator\AppData\Local\Microsoft\OneDrive\21.180.0905.0007\OneDriveSetup.exe /uninstall
https://twitter.com/PatrickGerber/status/1443240114952589312
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
-
Nicolas 6 Reputation points
2021-10-20T10:47:53.303+00:00 For me need to uninstall appx too:
Remove-AppxPackage -Package Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe
Remove-AppxProvisionedPackage -Online -PackageName Microsoft.OneDriveSync_21196.921.7.0_neutral__8wekyb3d8bbwe -
Robster 1 Reputation point
2021-10-20T13:32:54.82+00:00 I had the same problem trying to test a caputure of the Beta version to see what it'd be like.
I'd check the panther log, find it was stopping due to different AppX's, news, weather, etc... so powershell remove it and try again.
After numerous failures and a very long powershell script I go annoyed and ran:
Get-AppxPackage | Remove-AppxPackage
the system protected the essentials but everything else got hauled out. Oddly not only did it survive but I was able to capture and deploy windows 11 in MDT.
The problem I'm having is putting them back after the deployment. Some come back but others remain missing so I need to fine tune it but at least it proved it's possible to capture it if that's any comfort.
If anyone knows how to restore the AppX's post install to vanilla state then could you let me know?
I'm in the position where I've got it to deploy and it runs fine but part of me wonders if I've completely trashed it :-)
Rob