Blog

Blog

 
     
Jun 05 2016

There are a lot of neat articles on the net about removing built-in apps by powershell but some of them are missing a neat powershell script.

This HowTo provides a straight forward powershell script to remove a specified  list of built-in apps.

useful powershell commands:

  • Get-AppxPackage | fl name
  • Get-AppxPackage | Select Name, PackageFullName
  • Get-AppxPackage %PackageFullName% | Remove-AppxPackage
  • Get-AppxProvisionedPackage -online

The Powershell script is available as a free download in our Download Center.

Note: This script is provided as is.

<#
.SYNOPSIS
   Removes all (within this script) specified built-in apps.

.DESCRIPTION
   Removes all (within this script) specified built-in apps.
    Before running this script adjust the App-Packages in the given $appPackages-Array and set the $doIt variable to $TRUE
   
.NOTES
   Autor:            Swiss SafeLab GmbH
   Created:          23.05.2016
   Prerequisites:    Windows 10
    Useful commands:  - Get-AppxPackage | fl name
                     - Get-AppxPackage | Select Name, PackageFullName
                     - Get-AppxPackage %PackageFullName% | Remove-AppxPackage
                     - Get-AppxProvisionedPackage -online

.LINK
   http://www.swiss-safelab.com/
#>


#Set-ExecutionPolicy RemoteSigned

$doIt = $FALSE

$appPackages = @(
    "*3dbuilder*",
#    "*Appconnector*"
    "*CandyCrushSodaSaga*",
#    "*ConnectivityStore*"
#    "*contact support*"
    "*bingfinance*",
    "*bingnews*",
    "*bingsports*",
    "*bingweather*",
    "*commsphone*",
    "*getstarted*",
#    "*Messaging*"
    "*MicrosoftOfficeHub*"
    "*MicrosoftSolitaireCollection*"
    "*onenote*",
    "*people*",
#    "*photos*",
    "*skypeapp*",
    "*sway*",
    "*twitter*",
    "*windowsalarms*",
#    "*WindowsCamera*"
    "*windowscommunicationsapps*",
#    "*WindowsMaps*"
    "*WindowsPhone*",
#    "*WindowsSoundRecorder*"
#    "*WindowsStore*"
    "*xbox*"
    "*zunemusic*",
    "*zunevideo*"
)

if ($doIt) {
    foreach ($appPackage in $appPackages) {
        Write-Host "Removing Package: $appPackage  ..."
        Get-AppxPackage -allusers $appPackage | Remove-AppxPackage
        
        Write-Host ""
        Write-Host "Removing from Provisioning: $appPackage ..."
        Get-AppxProvisionedPackage -online | Where-Object {$_.PackageName -like $appPackage} | Remove-AppxProvisionedPackage -online
    }
} else {
    Write-Host -ForegroundColor RED "won't do it! Variable `$doIt is set to FALSE"
}

Subjects

Archive