New PC Automation PS Script: One-Click Uninstall Annoying Pre-installed Software

New PC Automation PowerShell Script: One-Click Uninstall Annoying Preinstalled Software

Every time we set up a new computer, if we’re using the official original Windows system, there are always some useless preinstalled apps, such as Quick Assist, Solitaire, and so on. Manually uninstalling them one by one is both time-consuming and laborious. So I’ve put together a PowerShell script that can uninstall these annoying apps with one click.


List of Preinstalled Software Removed by the Script

  • 3D Viewer
  • OneDrive
  • Office Desktop
  • Cortana
  • Maps
  • Movies & TV
  • Groove Music
  • Photos
  • Paint 3D
  • Mixed Reality Portal
  • Microsoft Solitaire Collection
  • Your Phone
  • OneNote
  • Skype
  • Sticky Notes
  • Xbox
  • Xbox Game Bar
  • Solitaire
  • Phone Link
  • Camera
  • People
  • Feedback Hub
  • Tips
  • Voice Recorder

https://wwkd.lanzn.com/i9Rsw2bwrisj


How to Use the Script

Double-clicking a PowerShell script won’t run it automatically, and right-clicking to run with PowerShell won’t grant administrator privileges. Therefore, it’s recommended to open the .ps1 file and copy the code.

  • Double-click UninstallPreinstalledApps.ps1 to open the script with Notepad
  • Copy the code inside
  • Press the shortcut Win+S to open Windows Search. Type powershell
  • Right-click on Windows PowerShell and select “Run as administrator”
  • Paste the code into PowerShell and press Enter to run

When uninstalling Xbox, PowerShell may show red errors, but that’s fine—Xbox has already been uninstalled.


How to Create the Script

The base code for this script is:

Get-AppxPackage -allusers *app* | Remove-AppxPackage

Here, Get-AppxPackage retrieves the package names of preinstalled apps, -allusers uninstalls for all users, and Remove-AppxPackage uninstalls the app package.

The text between the two asterisks is the fuzzy name of the app. The asterisk is a wildcard, so this method allows you to fuzzy-search for the app name and retrieve its package name.

For example, if I want to uninstall “3D Viewer” but don’t know its full package name, I can enter 3d between the two asterisks. PowerShell will fuzzy-search to find the full app name, retrieve the package name, and then uninstall it.

If you want to get all the app names and their corresponding package names for preinstalled apps, type Get-AppxPackage in PowerShell.

Name is followed by the app name, and PackageFullName is followed by the package name.

You can fully customize the script I provided by looking up the Chinese app names and creating your own personalized uninstall script.


New PC Automation PS Script: One-Click Uninstall Annoying Pre-installed Software
https://en.lvlele.top/142-new-machine-uninstall-preinstalled-software/
Author
Lvlele 吕了了
Posted on
June 4, 2026
Licensed under