Issue running Sysprep on windows 10 computer - (ET)

I am having trouble running a sysprep on windows 10 computer and wondering if someone can help.
Its a brand new windows 10 computer (dell optiplex) and after i run all the windows updates and install some standard apps it wont let me sysprep it. I tested the sysprep before doing all that and it worked but not working after.

This is the error i'm seeing when i try to sysprep:

and attached is the file it is referencing.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
Doing a search based on the info in the log:

To resolve this issue, remove the package for the user who's running sysprep, and also remove the provisioning. To do this, follow these steps.

Note To prevent Microsoft Store from updating apps, unplug the Internet connection or disable Automatic Updates in Audit mode before you create the image.
Run the Import-Module Appx PowerShell cmdlet.
Run Import-Module Dism.
Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.

In the output of this last cmdlet, check the users for whom the package is showing up as Installed. Delete these user accounts from the reference computer, or log on to the computer by using these user accounts. Then, run the cmdlet in step 4 to remove the Appx package.
This command lists all packages that were published by Microsoft and installed by any user of that reference computer. Because the computer is to be sysprepped, we assume that these user profiles no longer require the package.
If you have manually provisioned apps that belong to other publishers, run the following command to list them:

Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation
Run Remove-AppxPackage -Package <packagefullname>.
Remove the provisioning by running the following cmdlet:

Remove-AppxProvisionedPackage -Online -PackageName <packagefullname>
If you try to recover from an update issue, you can reprovision the app after you follow these steps.

Note The issue does not occur if you are servicing an offline image. In that scenario, the provisioning is automatically cleared for all users. This includes the user who runs the command.
tabushAuthor Commented:
The part they say about disconnecting the internet i cant do because one of the things i want to do before doing sysprep is running all windows updates.
I will try running the powershell commands that they mention in the link but do you know what "package" and "provisioning" they're talking about. What are they referring to?
Lee W, MVPTechnology and Business Process AdvisorCommented:
They are talking about the appx packages - those are the Windows 8 apps - the "Modern UI" apps with the bland colors, limited capabilities, intended usually for tablet use.

I don't know what you mean you can't disconnect the internet because you want to do Windows Updates - do the Windows updates. THEN disconnect the internet.

I'm pretty sure I had this problem 6 months ago... and I think this solved it for me...
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

tabushAuthor Commented:
Thanks i will try that.
I thought they meant to disconnect the internet the whole time from when i first power up the computer.
tabushAuthor Commented:
After running step 3 i tried deleting the user account that was showing next to all the packages. That didnt fix it.
The other option is to remove the apps and provisioning but there are a TON of them. Is there a way to remove all with one powershell line rather then each individually?
I dont care if i delete all the windows apps. I don't need them.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Just bob into Add/Remove Programs of whatever they call it now in Windows 10, have a quick look through and remove all the Apps which have been downloaded and added, e.g. CandyCrushSAGA etc it does take 5 minutes...

Also uninstall them using the Local Administrator account, no other accounts should be on the Workstation, and then Sysprep
tabushAuthor Commented:
I tried removing from there and also tried this powershell that i found: Get-AppxPackage | Remove-AppxPackage
The computer only has one local admin account at this point. I tried doing sysprep from it and still failing.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
what does the log state ?
tabushAuthor Commented:
See attached.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:

what is this ? remove it
tabushAuthor Commented:
The log keeps mentioning this Miracastview app so i tried this powershell but error said it couldnt find it
Remove-AppxProvisionedPackage -Online -PackageName Windows.MiracastView_6.3.0.0_neutral_neutral_cw5n1h2txyewy

Open in new window

tabushAuthor Commented:
This article might help me but one thing i'm not understanding: 

The part in the last comment where he says:
These were staged app entries and can be found as:

Get-AppXPackage -AllUser | % {if ($.PackageUserInformation.InstallState -eq "Staged"){$.PackageFullname}}

So, I left the reference image on the network and waited until all the staged entries disappeared (this took about 30 minutes). Rerunning the script above will not show any staged apps.

How does he actually get rid of the staged apps? Am i missing something?
tabushAuthor Commented:
Since it doesnt sound like there is any solution to this problem, does anyone have other suggestions for creating a windows 10 custom image?
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Don't add to domain, don't logon as another user. Login as Local Admin only. Don't connect to internet.

Deploy Windows 10 onto bare metal, and then Sysprep.

Your issue is that it's grabbed and downloaded updates from Internet.
tabushAuthor Commented:
Yes i suppose that is one option however one of the big reasons that we use an image when setting up new computers is getting it up to date with all windows updates takes forever so this generally saves time.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
We use Microsoft Deployment Toolkit, Syspreps, Deploys and Updates all at the same time, using a base of Microsoft OS, joins to the Domain, Add's users as Local Administrators, and also records the asset number in database and image they've got, so if it needs a re-image it can be re-done in no time at all.

Deployment time from PXE BOOT - baremetal is 35 minutes.

If you have many Workstations to deploy in your environment, it's a life saver, but does take some time to setup and get correct, like any infrastructure.

BUT....they comes a point, with an OS release, that Windows Updates can take a time to apply....
tabushAuthor Commented:
Looks like that might be my next option. We're an MSP though so lot of this is being done for different companies in different locations so getting image from local share isnt always an option.

I'm seeing tons of people talk about this sysprep issue online with no real solution. I'm hoping that microsoft fixes it soon in a future patch update.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You can generate MDT images for deployment offline!
tabushAuthor Commented:
Ok thanks. Ill have to do some research and learn how this MDT works.
Never used it before.
Same issue here.  I just want to create a master image with Windows 10 and updates with custom apps installed.  Looking to ghost it from there.
tabushAuthor Commented:
When i first tried doing this i took a fresh windows 10 pc out of the box, did whatever customization i wanted, ran all windows updates, then tried to run a sysprep.
What it seems is that when you run the windows updates it breaks the sysprep (or at least going from an old build to Fall Creators Update).
Rather, download the newest windows 10 installation media from microsoft website ( and burn the iso to a disk. Then use that disk to format the computer. Since its a new installation media it should have the most recent windows updates (or relatively recent). Then do your changes and sysprep. It worked for me.

Some notes: i didnt make any changes/additions to windows store apps. I didnt try running any more windows updates. I also left the network cable unplugged as much as i could before syspreping to avoid any automatic updates. I only connected it when i had to install some software from online. I'm not sure if these few items would affect the sysprep but i did it just in case.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
if you leave it connected to Internet, it auto installs these Apps from the App Store! App Store Crap! - and those Apps cause Sysprep failures!
Can you post your unattend.xml?  Mine keeps on failing.
tabushAuthor Commented:
Not sure what unattend.xml you're talking about. I didnt use one.
did you use an answer file on your sysprep?
tabushAuthor Commented:
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:

with some help  maybe!

Don't add to domain, don't logon as another user. Login as Local Admin only. Don't connect to internet.

Is that not what it says in this post https:#a42400012
tabushAuthor Commented:
The key is to use new windows 10 media rather than updating an old image. Then do what you want to customize the computer without connecting it to the internet. Then you can sysprep.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 10

From novice to tech pro — start learning today.