/build/static/layout/Breadcrumb_cap_w.png

Windows 10 Pro sysprep

For our Windows 10 deployment I've been working on our "Golden" image for Windows 10, ofcourse without all the bloatware.

But I'm unable to sysprep it after removing most of the software, for sysprepping i use the sysprep creator provisioned by Quest

I've found these 2 commands but don't seem to do the trick.

#Remove Most Provisioned Apps - Keep Basic Tools
Get-AppxProvisionedPackage -Online | Where-Object {$_.PackageName -notlike "*windows*"} |Where-Object {$_.PackageName -notlike "*store*"} | Remove-AppxProvisionedPackage -Online

#Remove Most Apps - Keep Basic Tools
Get-AppxPackage -AllUsers  | Where-Object {$_.PackageFullName -notlike "*windows*"} |Where-Object {$_.PackageFullName -notlike "*store*"} |Remove-AppxPackage

The sysprep log says:

2018-03-09 09:39:02, Info                  SYSPRP ========================================================
2018-03-09 09:39:02, Info                  SYSPRP ===          Beginning of a new sysprep run          ===
2018-03-09 09:39:02, Info                  SYSPRP ========================================================
2018-03-09 09:39:02, Info       [0x0f004d] SYSPRP The time is now 2018-03-09 09:39:02
2018-03-09 09:39:02, Info       [0x0f004e] SYSPRP Initialized SysPrep log at C:\Windows\system32\sysprep\Panther
2018-03-09 09:39:02, Info       [0x0f0054] SYSPRP ValidatePrivileges:User has required privileges to sysprep machine
2018-03-09 09:39:02, Info       [0x0f007e] SYSPRP FCreateTagFile:Tag file C:\Windows\system32\sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything
2018-03-09 09:39:02, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'
2018-03-09 09:39:02, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'
2018-03-09 09:39:02, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'SHUTDOWN'
2018-03-09 09:39:02, Info       [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'
2018-03-09 09:39:02, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'cleanup' internal providers.
2018-03-09 09:39:02, Info                  SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 3
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml, and mode
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2018-03-09 09:39:02, Info                  SYSPRP ActionPlatform::LaunchModule: Successfully executed 'Sysprep_Clean_Validate_Opk' from C:\Windows\System32\spopk.dll without error
2018-03-09 09:39:02, Info       [0x0f00d7] SYSPRP WinMain:Pre-validing 'generalize' internal providers.
2018-03-09 09:39:02, Info                  SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 1
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateSession: Successfully created instance with action file C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml, and mode
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::Validate: Beginning action execution from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Sysprep mode in registry is
2018-03-09 09:39:02, Info                  SYSPRP SysprepSession::CreateXPathForSelection: Processor architecture in registry is AMD64
2018-03-09 09:39:02, Info                  SYSPRP Entering SysprepGeneralizeValidate (Appx) - validating whether all apps are also provisioned.

2018-03-09 09:39:02, Error                 SYSPRP Package Microsoft.XboxIdentityProvider_12.30.5001.0_x64__8wekyb3d8bbwe was installed for a user, but not provisioned for all users. This package will not function properly in the sysprep image.

2018-03-09 09:39:02, Error                 SYSPRP Failed to remove apps for the current user: 0x80073cf2.

2018-03-09 09:39:02, Error                 SYSPRP Exit code of RemoveAllApps thread was 0x3cf2.

2018-03-09 09:39:02, Error                 SYSPRP ActionPlatform::LaunchModule: Failure occurred while executing 'SysprepGeneralizeValidate' from C:\Windows\System32\AppxSysprep.dll; dwRet = 0x3cf2
2018-03-09 09:39:02, Error                 SYSPRP SysprepSession::Validate: Error in validating actions from C:\Windows\System32\Sysprep\ActionFiles\Generalize.xml; dwRet = 0x3cf2
2018-03-09 09:39:02, Error                 SYSPRP RunPlatformActions:Failed while validating Sysprep session actions; dwRet = 0x3cf2
2018-03-09 09:39:02, Error      [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x3cf2
2018-03-09 09:39:02, Error      [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep generalize internal providers; hr = 0x80073cf2
2018-03-09 09:39:08, Info       [0x0f0052] SYSPRP Shutting down SysPrep log
2018-03-09 09:39:08, Info       [0x0f004d] SYSPRP The time is now 2018-03-09 09:39:08


I've been trying to get the software removed but have been unable to. And I assume after this one, more will follow.

Any tips?

Thanks in advance,

Duncan

0 Comments   [ + ] Show comments

Answers (3)

Posted by: akmagnum 6 years ago
Red Belt
0

Maybe there is something wrong with the uninstall script.

Try uninstalling the Apps you don't want individually.

Or use the

Get-AppxPackage *Appname* | Remove-AppxPackage

to remove the apps individually via powershell.

Example..... open powershell as admin an paste in......

a list of un wanted apps........

Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *CandyCrushSaga* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
Get-AppxPackage *skypeapp* | Remove-AppxPackage
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Get-AppxPackage *windowsmaps* | Remove-AppxPackage

Posted by: Channeler 6 years ago
Red Belt
0
Or use the Enterprise version of Windows. With one checkbox you could get rid of consumer features and apps. 
Posted by: mantexau 5 years ago
Blue Belt
0
Hi Duncan, 
in my experience I learnt that trying to remove all appx packages can potentially break sysprep. I used the information on found on this URL as a reference https://virtuallyinclined.com/2017/01/08/windows-10-appx-packages-can-break-sysprep/ and ended up putting together my own PS script to remove the appx packages as per my environment. This is my final PS script which I ran while in audit mode and had no issues running sysprep afterwards, of course, you may want to adjust this to suit your needs:
$AppxApps = @(
"Microsoft.WindowsAlarms"
"microsoft.windowscommunicationsapps"
"Microsoft.BingWeather"
"Microsoft.GetHelp"                    
"Microsoft.DesktopAppInstaller"
"Microsoft.Getstarted"            
"Microsoft.Messaging"
"Microsoft.MicrosoftOfficeHub"
"Microsoft.Microsoft3DViewer"
"Microsoft.MicrosoftSolitaireCollection"
"Microsoft.MSPaint"
"Microsoft.OneConnect"   
"Microsoft.Office.OneNote"
"Microsoft.People"                 
"Microsoft.Print3D"
"Microsoft.SkypeApp"                         
"Microsoft.StorePurchaseApp"
"Microsoft.Wallet"
"Microsoft.WindowsFeedbackHub"
"Microsoft.WindowsMaps"
"Microsoft.Windows.PeopleExperienceHost"
"Microsoft.Xbox.TCUI"       
"Microsoft.XboxApp"                      
"Microsoft.XboxGameOverlay"
"Microsoft.XboxIdentityProvider"        
"Microsoft.XboxSpeechToTextOverlay"
"Microsoft.ZuneMusic"                      
"Microsoft.ZuneVideo"
)
ForEach ($Appx in $AppxApps) {
Write-Host Removing $Appx
Get-AppxPackage $Appx | Remove-AppxPackage
Get-AppxProvisionedPackage -Online | Where-Object {$_.Displayname -eq $Appx} | Remove-AppxProvisionedPackage -Online
}


 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ