Windows 10 deployment: Pruning and pruning and pruning again

Windows deployment used to be so easy. You created a base or “golden” image. With Windows 7, for example, you could simply take the default Windows Image (.wim) file and use Microsoft Deployment Toolkit (MDT) to remove any unwanted applications and other junk you didn’t want in your base image, which you could then deploy en masse to your organization’s PCs. And that was that. This was kind of like way back in the old days when consumers would buy PCs and then remove all the junkware from AOL and other vendors that came preinstalled on the machines. Beginning with Windows 8.1, however, things got a bit messier as you now had to deal with Windows Universal Platform (WMP) apps and Windows Store apps that had been packaged using the App Package (.appx) format, a file that contains an app in a format that can be sideloaded on a device. Windows PowerShell turned out to be the go-to tool for doing this (we’ll look at some AppxPackage cmdlets in a moment) and once you became familiar with this, everything was more or less well again. And then along came Windows 10. When longtime Microsoft MVP Susan Bradley recently sent an open letter to Microsoft executives concerning Windows 10 deployment and problems installing updates on Windows 10, part of Microsoft’s reply to her letter included the following statement:

“Windows 10 is very different from earlier versions of Windows. Earlier versions of Windows consisted of a single product which was updated over time. Windows 10 consists entirely of a base install and then fluid updates.”

When an IT pro colleague read this statement, he remarked to me that it sounded to him like Microsoft was saying something like:

“We now tie in whatever we want, so now if you want to apply a security update your network stack we bundle in ‘Candy Crush’s greatest hits’ because our market research and telemetry indicate most Windows users install that right after getting this update anyway. Sorry, our telemetry doesn’t include many corporate installs because they turn that feature off.”

He then penned his own brief appeal to Microsoft as follows:

“Dear MS: Give us the Win10 base install. If you must roll fluid updates, make a PowerShell script available that uninstalls what we don’t want instead of making us reverse-engineer the changes each quarter.”

Re-engineering a base image for Windows 10 deployment

Windows 10 deploymentThe problem, of course, is that when you say “I’m going to do a Windows 10 deployment,” one responds “Which Windows 10?” Since the release in 2015, Windows 10 has gone through successive versions 1507, 1511, 1607, 1703, 1709, and 1803 with more soon to follow. And Microsoft’s idea is that when a new version is released, your existing version should be upgraded as soon as possible to the new version. Unfortunately, each time Microsoft rolls out a new version, new applications are added to Windows 10 while other apps you previously removed may be reinstalled. So each time your company or organization deploys a new version of Windows 10, you may need to do some cleanup afterward to remove any apps that you’ve decided are unnecessary or inappropriate for your business environment.

To do this you can start by making use of the Get-AppxPackage PowerShell cmdlet. This PowerShell cmdlet gets a list of the app packages that are installed. For example, try running the following command in an elevated (launched as administrator) PowerShell prompt:

Get-AppxPackage | Select Name, PackageFullName

 

Part of the output of this command will probably look something like this:

. . .

Microsoft.Reader                            Microsoft.Reader_10.1802.463.0_x64__8wekyb3d8bbwe                         

Microsoft.Print3D                           Microsoft.Print3D_2.0.10611.0_x64__8wekyb3d8bbwe                          

Microsoft.MicrosoftStickyNotes              Microsoft.MicrosoftStickyNotes_2.1.18.0_x64__8wekyb3d8bbwe                

Microsoft.3DBuilder                         Microsoft.3DBuilder_15.2.10821.1000_x64__8wekyb3d8bbwe                    

Microsoft.DesktopAppInstaller               Microsoft.DesktopAppInstaller_1.0.20921.0_x64__8wekyb3d8bbwe              

Microsoft.WindowsFeedbackHub                Microsoft.WindowsFeedbackHub_1.1712.1141.0_x64__8wekyb3d8bbwe             

Microsoft.HEVCVideoExtension                Microsoft.HEVCVideoExtension_1.0.11132.0_x64__8wekyb3d8bbwe               

Microsoft.XboxIdentityProvider              Microsoft.XboxIdentityProvider_12.41.24002.0_x64__8wekyb3d8bbwe           

Microsoft.Getstarted                        Microsoft.Getstarted_6.13.11581.0_x64__8wekyb3d8bbwe                      

Microsoft.WindowsCamera                     Microsoft.WindowsCamera_2018.426.70.0_x64__8wekyb3d8bbwe                  

Microsoft.BingSports                        Microsoft.BingSports_4.25.11802.0_x64__8wekyb3d8bbwe                      

. . .

 

You can then use this output to create a PowerShell script that removes all of the apps and other components that you don’t want in the newly upgraded version of Windows 10 on your organization’s PCs. For example, after upgrading to Windows 10 v.1803, you can use the Remove-AppxPackage to remove any apps you don’t want on your systems. For example, you might decide that you want to run the following commands on your organization’s PCs to declutter the recently upgraded Windows 10 v.1803 image to bring them closer to what a base image install should look like (in your opinion) on your PCs:

Get-AppxPackage -allusers *3dbuilder* | Remove-AppxPackage

Get-AppxPackage -allusers *windowscommunicationsapps* | Remove-AppxPackage

Get-AppxPackage -allusers *windowsalarms* | Remove-AppxPackage

Get-AppxPackage -allusers *windowscamera* | Remove-AppxPackage

Get-AppxPackage -allusers *officehub* | Remove-AppxPackage

Get-AppxPackage -allusers *getstarted* | Remove-AppxPackage

Get-AppxPackage -allusers *skypeapp* | Remove-AppxPackage

Get-AppxPackage -allusers *zunemusic* | Remove-AppxPackage

Get-AppxPackage -allusers *windowsmaps* | Remove-AppxPackage

Get-AppxPackage -allusers *solitairecollection* | Remove-AppxPackage

Get-AppxPackage -allusers *bingfinance* | Remove-AppxPackage

Get-AppxPackage -allusers *zunevideo* | Remove-AppxPackage

Get-AppxPackage -allusers *bingnews* | Remove-AppxPackage

Get-AppxPackage -allusers *onenote* | Remove-AppxPackage

Get-AppxPackage -allusers *people* | Remove-AppxPackage [fail]

Get-AppxPackage -allusers *windowsphone* | Remove-AppxPackage

Get-AppxPackage -allusers *bingsports* | Remove-AppxPackage

Get-AppxPackage -allusers *bingweather* | Remove-AppxPackage

Get-AppxPackage -allusers *xbox* | Remove-AppxPackage

Get-AppxPackage -allusers *candy* | Remove-AppxPackage

Get-AppxPackage -allusers *disney* | Remove-AppxPackage

Get-AppxPackage -allusers *minecraft* | Remove-AppxPackage

Get-AppxPackage -allusers *MysteryofShadows* | Remove-AppxPackage

Get-AppxPackage -allusers *EssentialsforDell* | Remove-AppxPackage

Get-AppxPackage -allusers *MediaPlayerforDell* | Remove-AppxPackage

Get-AppxPackage -allusers *Power2GoforDell* | Remove-AppxPackage

Get-AppxPackage -allusers *PowerDirectorforDell* | Remove-AppxPackage

Get-AppxPackage -allusers *Wallet* | Remove-AppxPackage

Get-AppxPackage -allusers *Dolby* | Remove-AppxPackage

Get-AppxPackage -allusers *LinkedIn* | Remove-AppxPackage

 

You might also need to do a bit of additional research online to remove certain Windows 10 functionality. For example, in Windows 10 v.1803 the following command will remove “Mobile plans” from your system:

Get-AppxPackage *Microsoft.OneConnect* | Remove-AppxPackage

 

Some stuff is even harder to remove. For example, none of my colleagues nor I have figured out how to remove Microsoft Mixed Reality stuff from v.1803.

Some additional Windows 10 deployment tips

It’s easier to use the Get-AppxPackage cmdlet if you redirect the output of the command into a text file like this:

Get-AppxPackage | Select Name, PackageFullName > C:\test\v.1803.applist.txt

 

You could then compare this with your earlier text file v.1709.applist.txt to see what has changed from your previous baseline image.

Another way you can list the AppX packages that are present on a Windows 10 system is to run the DISM command in online mode like this:

DISM /Online /Get-ProvisionedAppxPackages | select-string Packagename

Finally, if there are certain kinds of Windows 10 functionality that you can’t figure out how to remove using PowerShell, you can always try falling back to Group Policy and check whether there are any policy settings you can configure that will lock those functionalities out of your managed Windows 10 systems.

Featured image: Shutterstock

About The Author

2 thoughts on “Windows 10 deployment: Pruning and pruning and pruning again”

  1. Not working so far Mitch, I get this on trying to remove xBox in powershell as admin:

    Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top