Search Computer Help Please

Wednesday, July 5, 2017

Windows 10: Sysprep error Failed to remove apps for the current user: 0x80073cf2.

Why Sysprep Why...


2017-07-06 12:59:56, Error              
SYSPRP Package Microsoft.Appconnector_1.3.3.0_neutral__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

2017-07-06 12:59:56, Error              
SYSPRP Failed to remove apps for the current user: 0x80073cf2.

2017-07-06 12:59:56, Error              
SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.

Recent sysprep issue that was driving me banana's basically anytime you try and run sysprep it would stop telling me to check the setupact.log for issues, error above


Error: One or more users has packages installed under their user profile, if you receive package not found its just not found under your user profile

Resolutions:

1. The packages belong only on your profile

open up powershell

get-appxpackages | Remove-appxpackages                   (will remove all packages )

get-appxprovisionedpackages -online | Remove-appxprovisionedpackages -Online ( removes all provisioned)

if you want to be more selective you can do get-appxpackages

get-appxpackages > c:\list.txt will give you a quick output

1. Remove Users with package issues

If this is a sysprep image you most likely won't need multiple user accounts on the image. 

goto Advanced System Settings -> Advaned Tab -> User Profiles Settings 

remove unneeded profiles, only remove them if you can see the name visible if are seeing unknown profile or an un-recognizable name removing the profile will not fix your issue

3. Find out what user has the package installed

run get-appxpackages > c:\list.txt 

Open up the list and you will see for example

Microsoft.Appconnector_1.3.3.0_neutral__8wekyb3d8bbwe
PackageUserInformation : {S-1-5-21-1338954240-834293059-396468565-3684 [S-1-5-21-1338954240-834293059-396468565-3684]: 
                         Installed, S-1-5-21-1338954240-834293059-396468565-15198 
                         [S-1-5-21-1338954240-834293059-396468565-15198]: Installed, 
                         S-1-5-21-1338954240-834293059-396468565-500 [S-1-5-21-1338954240-834293059-396468565-500]: 
                         Installed, S-1-5-21-1338954240-834293059-396468565-15164 
                         [S-1-5-21-1338954240-834293059-396468565-15164]: Installed}

The package lists all SID's with offending package

Logon to DC and use AD Module for Powershell

Get-ADUser -identity

e.g "Get-ADUser -identity S-1-5-21-1338954240-834293059-396468565-15164"

this will return the username , which you can then use to login to that machine if the profile no longer exists on the machine or if the machine is still attached to the domain and you are seeing clear usernames under the user profiles simply remove the offending profile.


Good Luck & I hope that helped , until next time.. feel free to leave comments/questions

note: this is on the latest version of windows 10 pro as of 6/7/17 & I also did try get-appxpackages -allusers | remove-appxpackages but with 0% success