Building a new Lab around Windows server 2022 brings all the basics again , new vm’s new image of wim to vhd , sysprep what ever option you do to build a new lab. In this case I want to sysprep the VM this failed as Edge was not installed for all users. As it is a insider build this probably will be fixed in the next releases.
Running sysprep I got the Following Error.
SYSPRP Package Microsoft.MicrosoftEdge.Stable_86.0.622.38_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
SYSPRP Package Microsoft.MicrosoftEdge.Stable_86.0.622.38_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.
2021-03-01 14:21:06, Error SYSPRP Failed to remove apps for the current user: 0x80073cf2.
2021-03-01 14:21:06, Error SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.
2021-03-01 14:21:06, Error SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing ‘SysprepGeneralizeValidate’ from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2021-03-01 14:21:06, Error SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2021-03-01 14:21:06, Error SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
Uninstalling the MS Edge from the uninstall section
Microsoft.MicrosoftEdge.Stable_86.0.622.38_neutral__8wekyb3d8bbwe
It’s gone but the SysPrep still failed.
Ah it is a modern app So we need to remove this, listing all the Microsoft Apps.
Getting the Proper Package and remove this
Microsoft.MicrosoftEdge.Stable_86.0.622.38_neutral__8wekyb3d8bbwe
Powershell Command :
Remove-AppxPackage -Package Microsoft.MicrosoftEdge.Stable_86.0.622.38_neutral__8wekyb3d8bbwe
After This is removed I did a Reboot and Installed the MS Edge for all users and the sysprep Went fine.
Installing Edge.
#Create temp folder
New-Item -Path ‘C:\temp’ -ItemType Directory -Force | Out-Null
#Install Edge
Invoke-WebRequest -Uri "http://dl.delivery.mp.microsoft.com/filestreamingservice/files/c39f1d27-cd11-495a-b638-eac3775b469d/MicrosoftEdgeEnterpriseX64.msi" -OutFile ‘c:\temp\MicrosoftEdgeEnterpriseX64.msi’
Invoke-Expression -Command ‘C:\temp\MicrosoftEdgeEnterpriseX64.msi /quiet /norestart’
My syspreped Machine. with edge
Follow Me on Twitter @ClusterMVP
Follow My blog https://robertsmit.wordpress.com
Linkedin Profile Robert Smit MVP Linkedin profile
Google : Robert Smit MVP profile
I ran into this same Sysprep issue. Thank you so much for the detailed info and resolution.
Thanks Todd for letting me know.
The bug in still in there with the official released preview out today. Is it even a bug?
It works perfectly in my build. I would download the latest version of the ISO and make sure it is the same error, could also be something in the unattend.xml or delete it to make sure.
Still a problem in WS 2022 GA. Thanks! The URL for downloading the MSI does not work, just download the new Edge installer, and the sysprep with Edge installed worked again.