In my case OneDrive was installed on another user than the one I was logged in to. So I ran the following in PowerShell:
Get-AppxPackage -AllUsers Microsoft.OneDriveSync | Remove-AppxPackage -AllUsers
And after that it worked.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In spite of removing Microsoft.OneDriveSync, the sysprep errors continued
2022-02-09 14:25:11, Error SYSPRP Package Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2022-02-09 14:25:11, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2022-02-09 14:25:11, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2022-02-09 14:25:11, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2022-02-09 14:25:11, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2022-02-09 14:25:11, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2022-02-09 14:25:11, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2022-02-09 14:25:11, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2022-02-09 14:42:30, Error SYSPRP Package Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2022-02-09 14:42:30, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2022-02-09 14:42:30, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2022-02-09 14:42:30, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2022-02-09 14:42:30, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2022-02-09 14:42:30, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2022-02-09 14:42:30, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2022-02-09 14:42:30, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2022-02-09 14:55:38, Error SYSPRP Package Microsoft.OneDriveSync_21220.1024.5.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2022-02-09 14:55:38, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2022-02-09 14:55:38, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2022-02-09 14:55:38, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2022-02-09 14:55:38, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2022-02-09 14:55:38, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2022-02-09 14:55:38, Error [0x0f0070] SYSPRP RunDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2022-02-09 14:55:38, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
In my case OneDrive was installed on another user than the one I was logged in to. So I ran the following in PowerShell:
Get-AppxPackage -AllUsers Microsoft.OneDriveSync | Remove-AppxPackage -AllUsers
And after that it worked.
Thanks, this worked for me: Get-AppxPackage -AllUsers Microsoft.OneDriveSync | Remove-AppxPackage -AllUsers
Had to run Powershell in Administrator mode. May have also done a restart before running the Sysprep application again.
This seems to be a bug in Windows 11 and there are many reports being filled by users for the same issue. Many have stated some workaround that has worked for them you can get those workarounds from the below thread.
Windows 11 MDT Sysprep Failure | OneDrive
https://learn.microsoft.com/en-us/answers/questions/596112/windows-111-mdt-sysprep-failure-onedrive.html?page=2&pageSize=10&sort=oldest
These steps may or may not work for you, the best way is to raise feedback to the Microsoft team regarding this. The Feedback Hub app lets you tell Microsoft about any problems you run into https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332
Hope this resolves your Query!!
----------
--If the reply is helpful, please Upvote and Accept it as an answer--
Refer the below article, discuss about the same issue
Hi,
Hope everything goes well.
May we know the current status of the question? If there is any chance to try above suggestion? If it's helpful, it's appreciated that you could click "Accept Answer" and upvote it. This will help other users to search for useful information more quickly.
If there is any other assistance we can provide, please feel free to let us know, we will do our best to help you.
Thanks and regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
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.