Hi,
when you call sysprep and it fails (logfile C:\windows\System32\sysprep\panther\setuperr.log) with an error “Package xy installed for a user, but not provisioned for all users” you have to remove those packages from the user profile.
Root cause is that the user has installed those package(s) but they are not provisioned for all users.
To solve this get a list of all provisioned appx apackages and remove the packages for all users which are not provisioned. Error can ignored..
PS D:\> $aProvPackages=@(Get-AppxProvisionedPackage -Online).PackageName PS D:\> Get-AppxPackage -AllUsers | ?{ -not ($aProvPackages -contains $_.PackageFullName ) } | %{write-host $_;Remove-AppxPackage -AllUsers -Package $_}
Michael
Advertisment to support michlstechblog.info
Thank you Michael!
After searching various TechNet forums and getting nowhere, your code managed to get my image Sysprep’d.
Thank you very much.
just saved me 2-5 hours of removing then one by one.
thanks a lot
Thank you! Worked for me as well.
Thanks, saved me so much time!;)
1.Navigate to C:\windows\system32\ and search for the sysprep folder, go to properties change the ownership of the folder to to the local admin by changing the permissions in Advance menu.
2. After you take the ownership of the folder you can open sysprep\actionfiles and edit the Generalize.xml and remove the following entry from there.
3. Save as the Generalize.xml on any desired location and then rename the existing Generalize.xml to old and replace it with the new one.
4. Run sysprep Generalize and see if that works for you.
Hi Amar,
nice hint. See it on other pages too. But have never tried it.
Michael
It worked for me beautifully
@Amar Honnungar XML snipped added
Thank you! Great post
I didn’t really worked for me, but it served to enlighten some other causes
What did work for me was creating a new user (admin) and removing all the others (I only had one). Then, after restarting the PC, sysprep worked as a charm