Skip to content

Instantly share code, notes, and snippets.

@mkubenka
Last active April 30, 2017 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mkubenka/b71ce24edf4cbff4e5b217068e096ff7 to your computer and use it in GitHub Desktop.
Save mkubenka/b71ce24edf4cbff4e5b217068e096ff7 to your computer and use it in GitHub Desktop.
Remove the ‘Modern apps’ (anything from the ‘Store’) from the profile you are using to create your Windows 10 image.
# Remove some Windows Store pakacges which are blocking Sysprep
# Execution of scripts has to be neabled: Set-ExecutionPolicy RemoteSigned
# https://forums.fogproject.org/topic/5873/windows-10-unattend-xml-sysprep-answer-file-challenge/16
$AppsList = "Microsoft.Bing" , "Microsoft.BingFinance" , "Microsoft.BingMaps" , "Microsoft.BingNews"`
, "Microsoft.BingSports" , "Microsoft.BingTravel" , "Microsoft.BingWeather" , "Microsoft.Camera"`
, "microsoft.microsoftskydrive" , "Microsoft.Reader" , "microsoft.windowscommunicationsapps"`
, "microsoft.windowsphotos" , "Microsoft.XboxLIVEGames" , "Microsoft.ZuneMusic"`
, "Microsoft.ZuneVideo" , "Microsoft.Media.PlayReadyClient"
, "9E2F88E3.Twitter", "king.com.CandyCrushSaga"
ForEach ($App in $AppsList)
{
$PackageFullName = (Get-AppxPackage $App).PackageFullName
if ((Get-AppxPackage $App).PackageFullName)
{
Write-Host "Removing Package: $App"
remove-AppxProvisionedPackage -online -packagename $PackageFullName
remove-AppxPackage -package $PackageFullName
}
else
{
Write-Host "Unable to find package: $App"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment