I'm not a sysadmin, but I volunteer at a local Community Center where we have 20 public PCs running a custom Windows 10 Pro 22H2 image. I'm trying to upgrade one of these machines to Windows 11 and create a new image using sysprep. Here's what I've done so far:
- I downloaded an ISO using the Media Creation Tool and created a bootable USB with Rufus.
- I deployed a clean Windows 10 reference image after running checks with dism and sfc.
- After that, I logged in as the admin and executed the setup.exe from the USB for an in-place upgrade.
- Once the upgrade was finished, I logged in again and tried to run sysprep, but I keep getting errors about apps like Microsoft Copilot, Widgets, and OneDriveSync that say, "the app was installed for a user, but not provisioned for all users." This cycle is exhausting!
I'm looking for guidance on a couple of points:
1. Is there a script that can help identify and fix these problematic apps?
2. Is there a way to see how many apps I need to fix?
3. Can I stop these apps from being provisioned initially?
Any help would be greatly appreciated!
3 Answers
It sounds like having apps provisioned under the local admin account is causing your sysprep issues. One effective method is to remove all AppX packages completely and start fresh. We usually create a capture image, install all updates, and then run the command `Get-AppxPackage | Remove-AppxPackage` before imaging the PCs. This should clear out the problematic apps for you!
I have a script I use to prepare for sysprep, which includes cleaning up specific apps that frequently cause problems. Here it is:
```
# CleanUp for Sysprep
Get-AppxPackage -AllUsers -Name Microsoft.WidgetsPlatformRuntime | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxPackage -AllUsers *Copilot* | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
Get-AppxPackage -AllUsers *BingSearch* | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
```
After running that, I put the device into audit mode and reboot.
You can try using this command to help identify and possibly fix the issues: `Get-AppxPackage -AllUsers | Select-Object Name, PackageFullName, PackageUserInformation`. It’ll give you a rundown of the non-provisioned apps.
Thanks! I'll definitely give that a shot.

Yes, that's the way to go. After the upgrade, definitely run the command to clean up the packages before capturing the new image. As for applying the upgrade to an offline .wim, that usually requires a different approach—let me know if you need guidance!