Remove App Packages from Windows 10 Enterprise Edition
So you've installed Windows 10 enterprise edition only to find applications that you would consider to be consumer type apps such as Bing Finance, News, and Sports which is not what you would normally expect to find in an enterprise edition operating system version:
You can obtain a list of these app packages for the current user with the Get-AppxPackage PowerShell cmdlet. I've sorted the list of app packages by name in the following results:
1Get-AppxPackage | Sort-Object -Property Name | Select-Object -Property Name
I've determined which app packages that I want to remove and I'll remove them for the current user with the following PowerShell script:
1'Microsoft.3DBuilder', 'Microsoft.BingFinance', 'Microsoft.BingNews',
2'Microsoft.BingSports', 'Microsoft.MicrosoftSolitaireCollection',
3'Microsoft.People', 'Microsoft.Windows.Photos', 'Microsoft.WindowsCamera',
4'microsoft.windowscommunicationsapps', 'Microsoft.WindowsPhone',
5'Microsoft.WindowsSoundRecorder', 'Microsoft.XboxApp', 'Microsoft.ZuneMusic',
6'Microsoft.ZuneVideo' |
7ForEach-Object {
8 Get-AppxPackage -Name $_ |
9 Remove-AppxPackage
10}
The app packages that were previously removed no longer exist for the current user:
1Get-AppxPackage | Sort-Object -Property Name | Select-Object -Property Name
One thing to keep in mind is this occurs for the current user so if you're logging into your machine as a non-admin (which I highly recommend) and you run PowerShell elevated, whatever user you specify when you're prompted for elevation is the user account the applications will be removed for. This will make it appear as if the command didn't work.
The secret to removing these applications for the current user is that PowerShell doesn't need to run elevated (run an admin) as shown in the previous examples where the PowerShell console doesn't say "Administrator" in the title bar of the console window.
When complete, you should notice that those applications have been removed from your start menu, screen, or whatever they're calling it now days:
Get-AppxPackage
does have an AllUsers
parameter but that only retrieves applications for all
users and doesn't remove them for all users when piping to
Remove-AppxPackage.
You could also walk through the applications one by one and remove the desired ones by simply piping
Get-AppxPackage
to Remove-AppxPackage
using the Confirm
parameter:
1Get-AppxPackage | Remove-AppxPackage -Confirm
What if you want to prevent these applications from being installed for any new user that's created on your machine? Well, you're in luck because these's a cmdlet for that.
The Get-AppxProvisionedPackage cmdlet retrieves a list of app packages that are set to be installed for each new user that's created. Note that this command does require elevation.
1Get-AppxProvisionedPackage -Online | Sort-Object -Property DisplayName | Select-Object -Property DisplayName
When combined with the Remove-ProvisionedAppxPackage cmdlet, specific app packages can be removed from the current operating system image:
1$Packages = 'Microsoft.3DBuilder', 'Microsoft.BingFinance', 'Microsoft.BingNews',
2'Microsoft.BingSports', 'Microsoft.MicrosoftSolitaireCollection',
3'Microsoft.People', 'Microsoft.Windows.Photos', 'Microsoft.WindowsCamera',
4'microsoft.windowscommunicationsapps', 'Microsoft.WindowsPhone',
5'Microsoft.WindowsSoundRecorder', 'Microsoft.XboxApp', 'Microsoft.ZuneMusic',
6'Microsoft.ZuneVideo'
7
8Get-AppxProvisionedPackage -Online |
9Where-Object DisplayName -In $Packages |
10Remove-ProvisionedAppxPackage -Online |
11Out-Null
As you can see, the specified apps have been removed from the operating system image:
1Get-AppxProvisionedPackage -Online | Sort-Object -Property DisplayName | Select-Object -Property DisplayName
The Remove-AppxProvisionedPackage cmdlet doesn't remove the app packages that are already installed for any preexisting users, but it does prevent any new users from receiving the app packages that are removed from the operating system image.
Update:
I received notification from fellow PowerShell MVP Emin Atac that there's a known problem where sysprep fails after removing or updating Windows built-in Windows Store apps as referenced in KB2769827 so take that into consideration when removing apps.
µ