Sysprep quick fix

2017/10/18 06:13
Sometime, sysprep operation may fail with the following error message:

System Preparation Tool 3.14
A fatal error occurred while trying to sysprep the machine
Details can be found on Microsoft web site 

The quick fix is available here

Run as administrator PowerShell

Import-Module Appx
Import-Module Dism

Get-AppxPackage -AllUser | Format-List PackageFullName

Copy the result in new text file. 

In the text file, replace "PackageFullName:" with "Remove-AppxPackage -Package". 

Copy the edited rows and paste in power shell window. 

Check is there any apps left.

Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe |  Format-List -Property PackageFullName,PackageUserInformation

Run sysprep again.