jueves, 8 de febrero de 2018

Windows 10 – AppX Packages Can Break Sysprep

Hi.

I was suffering a problem using MDT trying to capture with sysprep the Windows 10 x86 1709 release. The log shows the error 0x3cf2 after launching sysprep /generalize.

Problem and solution appears here:  KB2769827  but this guy https://virtuallyinclined.com/2017/01/08/windows-10-appx-packages-can-break-sysprep/ and myself went from throwing lines after launching sysprep /generalize again and again.

 I'd appreciate your feedback and update if you would detect that I had to remove more apps after changing them in Windows 10, because I've seen that these are changing depending on the apps promoted by Microsoft in every period.

The second problem I've found is that the shawn's script is not updated for W10 v1709 so I updated this.

Finally the scripts are:

FIRST ONE:

Import-Module AppX
Import-Module Dism

#You may have to manually uninstall some Sponsored Apps from the Start Menu

#Microsoft Apps
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.BingTranslator* | Remove-AppxPackage
Get-AppxPackage *Microsoft.FreshPaint* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.NetworkSpeedTest* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.OneConnect* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsCalculator* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsMaps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage
Get-AppxPackage *SpotifyAB.SpotifyMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.bingnews* | Remove-AppxPackage
Get-AppxPackage *king.com.BubbleWitch3Saga* | Remove-AppxPackage
Get-AppxPackage *king.com.CandyCrushSodaSaga* | Remove-AppxPackage
Get-AppxPackage *A278AB0D.MarchofEmpires* | Remove-AppxPackage
Get-AppxPackage *A278AB0D.DisneyMagicKingdoms* | Remove-AppxPackage
Get-AppxPackage *DolbyLaboratories.DolbyAccess* | Remove-AppxPackage

#Sponsored Apps
Get-AppxPackage *Duolingo* | Remove-AppxPackage
Get-AppxPackage *EclipseManager* | Remove-AppxPackage
Get-AppxPackage *Flipboard* | Remove-AppxPackage
Get-AppxPackage *Wunderlist* | Remove-AppxPackage


AND THE SECOND ONE:

Import-Module AppX
Import-Module Dism

#You may have to manually uninstall some Sponsored Apps from the Start Menu

#Remove AppX Packages for non-business Apps
Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage
Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage
Get-AppxPackage *Microsoft.People* | Remove-AppxPackage
Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage
Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxApp* | Remove-AppxPackage
Get-AppxPackage *Microsoft.XboxIdentityProvider* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage
Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage

#Remove AppX Provisioning for non-business apps
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.3DBuilder" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Getstarted" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Messaging" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftOfficeHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.MicrosoftSolitaireCollection" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.Office.OneNote" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.People" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.SkypeApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "microsoft.windowscommunicationsapps" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.WindowsFeedbackHub" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxApp" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.XboxIdentityProvider" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneMusic" | Remove-AppxProvisionedPackage -Online
Get-AppxProvisionedPackage -Online | where Displayname -EQ "Microsoft.ZuneVideo" | Remove-AppxProvisionedPackage -Online