Post

How To Install and Remove Default Apps from Windows Using PowerShell

How To Install and Remove Default Apps from Windows Using PowerShell

How To Install Apps with PowerShell

  1. Open PowerShell as Administrator
  2. Get a list of all default Windows apps
    1
    
    Get-AppxPackage -AllUsers | Select Name
    

    You’ll notice there’s quite a long list of apps returned

  3. Search for an App Let’s filter our search for a specific app. For example, if we wanted to reinstall the Windows Store app, we could find the name of the Windows Store with the following command:
    1
    
    Get-AppxPackage -AllUsers | Where-Object { $_.Name -like '*store*' } | Select Name
    
    1
    2
    3
    4
    5
    6
    
    Name
    ----
    Microsoft.Services.Store.Engagement
    Microsoft.Services.Store.Engagement
    Microsoft.StorePurchaseApp
    Microsoft.WindowsStore
    

    As you can see, the results are much more manageable

  4. Reinstall the app using the name we just found
    1
    
    Get-AppxPackage -AllUsers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
    

How To Remove Default Apps with Powershell

  1. Get a list of installed apps and the package’s full name
    1
    
    Get-AppxPackage | select Name, PackageFullName | Format-List
    
  2. Search through the results

Powershell how to use find instruction screenshot Alternatively, you can hit alt + space then hit “e” and “f” to open the search dialog instead of right-clicking the title bar.

  1. Remove the app with the package’s full name
    1
    2
    
    # Remove the Camera App
    Remove-AppxPackage Microsoft.WindowsCamera_2023.2305.4.0_x64__8wekyb3d8bbwe
    
  2. Remove multiple apps
    1
    2
    
    # Removes BingWeather, GetHelp and People
    "Microsoft.BingWeather", "Microsoft.GetHelp", "Microsoft.People" | ForEach { Get-AppxPackage -Name $_ | Remove-AppxPackage }
    

What if the Microsoft Store is missing from installed package list?

Sometimes, the Microsoft Store can’t be reinstalled using the commands listed above. In that case, you can use the Xbox app to re-install the Microsoft Store. If you don’t have the Xbox app installed, it can be downloaded here.

Click on the green banner at the bottom of the app that says “Fix them in Settings”

Xbox app reinstall Microsoft Store

Install the Microsoft Store from the list of dependencies listed (this screenshot was taken from a machine that had the Microsoft Store installed already)

Install Dependencies for XboxApp

This post is licensed under CC BY 4.0 by the author.