```

#Script to remove modern-ui applications from Windows 8.1 SOE during build process

#Set the execution policy Set-ExecutionPolicy bypass

#Import DISM Module Import-Module DISM

#Application Removal list - app must be the “full package name” from get-appxpackages in “item”,”item” format $removelist = “microsoft.microsoftskydrive_16.4.4204.712_x64__8wekyb3d8bbwe”,”Microsoft.XboxLIVEGames_1.0.927.0_x64__8wekyb3d8bbwe”,”microsoft.windowsphotos_16.4.4204.712_x64__8wekyb3d8bbwe”,”Microsoft.ZuneMusic_1.0.927.0_x64__8wekyb3d8bbwe”,”Microsoft.ZuneVideo_1.0.927.0_x64__8wekyb3d8bbwe”,”Microsoft.Bing_1.2.0.137_x64__8wekyb3d8bbwe”,”Microsoft.BingNews_1.2.0.135_x64__8wekyb3d8bbwe”,”Microsoft.BingTravel_1.2.0.145_x64__8wekyb3d8bbwe”,”Microsoft.BingFinance_1.2.0.135_x64__8wekyb3d8bbwe”,”Microsoft.BingSports_1.2.0.135_x64__8wekyb3d8bbwe”,”Microsoft.BingWeather_1.2.0.135_x64__8wekyb3d8bbwe”,”Microsoft.BingMaps_1.2.0.136_x64__8wekyb3d8bbwe”,”Microsoft.Reader_6.2.8516.0_x64__8wekyb3d8bbwe”,”Microsoft.BingMaps_2.0.2530.2317_x64__8wekyb3d8bbwe”,”Microsoft.BingSports_3.0.2.233_x64__8wekyb3d8bbwe”,”Microsoft.Office.OneNote_16.0.1929.1156_x64__8wekyb3d8bbwe”,”Microsoft.XboxLIVEGames_2.0.139.0_x64__8wekyb3d8bbwe”,”Microsoft.SkypeApp_2.7.0.1002_x86__kzf8qxf38zg5c”,”Microsoft.BingFinance_3.0.2.243_x64__8wekyb3d8bbwe”,”Microsoft.BingFoodAndDrink_3.0.2.243_x64__8wekyb3d8bbwe”,”Microsoft.BingHealthAndFitness_3.0.2.243_x64__8wekyb3d8bbwe”,”Microsoft.BingTravel_3.0.2.243_x64__8wekyb3d8bbwe”,”Microsoft.Reader_6.3.9654.17044_x64__8wekyb3d8bbwe”,”Microsoft.ZuneMusic_2.2.800.0_x64__8wekyb3d8bbwe”,”Microsoft.ZuneVideo_2.2.802.0_x64__8wekyb3d8bbwe”,”Microsoft.Media.PlayReadyClient.2_2.11.2154.0_x64__8wekyb3d8bbwe”

#put aps in list $list = Get-AppxPackage

#function to remove it all foreach ($r in $removelist) { #Write-Host $r foreach ($l in $list) { #Write-Host $l.PackageFullName if ($r -eq $l.PackageFullName) { # Write-Host $r “- “ $l.PackageFullName Remove-AppxPackage -Package $l.PackageFullName } } }

$list2 = Get-AppxProvisionedPackage -Online

foreach ($r in $removelist) {

Write-Host $r

foreach ($l2 in $list2) { #Write-Host $l2.PackageName if ($r -eq $l2.PackageName) { #Write-Host $r “- “ $l2.PackageName Remove-AppxProvisionedPackage -online -PackageName $l2.PackageName } } } ```