Skip to main content

Remove PUA

Summary

This script manages the removal of predefined bloatware packages or lists installed bloatware based on a centrally maintained list. It offers three primary operations: bulk removal, selective removal, and bloatware listing. The remove parameter allows bypassing the PUA List to remove any installed AppxPackage.

PUA List: https://content.provaltech.com/attachments/potentially-unwanted-applications.json

Sample Run

Sample Run 1

To get the list of installed Bloatware:
Sample Run 2

To remove all installed Bloatware installed on the computer from the PUA List:
Sample Run 3

To remove all installed Bloatware except any of WindowsStoreApps category apps and Microsoft.BingNews, and Microsoft.MSPaint:
Sample Run 4

To remove individual AppxPackages installed on the machine like Microsoft.MicrosoftOfficeHub, Microsoft.XboxApp, Microsoft.Messaging, and Microsoft.People:
Sample Run 5

Sample Run 6

Dependencies

Remove-PUA

User Parameters

NameExampleRequiredTypeDescription
ListBloatwareYesFalseFlagSelect Yes to list installed bloatwares without making changes.
RemoveMicrosoft.MicrosoftOfficeHub,Microsoft.XboxAppFalseTextSpecify name(s) of the bloatwares to uninstall.
RemoveAllYesFalseFlagSet it to Yes to remove all bloatware by category or all found bloatware with or without exceptions
CategoryXboxFeaturesAppsFalseTextUsed with RemoveAll to filter bloatware to a certain category, allowing you to select just a specific category of bloatware. Accepted Values includes
- MsftBloatApps
- ThirdPartyBloatApps
- WindowsStoreApps
- XboxFeaturesApps
- NonAppxApps
ExceptxboxGameOverlayFalseTextUsed with RemoveAll or Category to remove all except some item(s) from a category or all together
PUAListSourcehttps://my.cdn.example/pua.json, C:\ProgramData\_Automation\Script\PUA\pua.jsonFalseText StringOptional source for an alternate PUA list JSON. When provided, the script will use the specified local JSON file or downloadable URL instead of the default PUA list (https://content.provaltech.com/attachments/potentially-unwanted-applications.json).

Note : The optional JSON file must contain only the following two supported categories: "MsftBloatApps" and "ThirdPartyBloatApps". All bloatware package names must be listed under one of these categories, as the script only processes these two categories. Any other categories included in the JSON file will not be recognized or processed by the script.

Implementation

Script Details

Step 1

Navigate to AutomationTasks
step1

Step 2

Create a new Script Editor style task by choosing the Script Editor option from the Add dropdown menu
step2

The New Script page will appear on clicking the Script Editor button:
step3

Step 3

Fill in the following details in the Description section:

Name: Remove - PUA
Description:

Bash Script

Category: Application

Task Detail

Parameters

ListBloatware

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set ListBloatware in the Parameter Name field.
  • Select Flag from the Parameter Type dropdown menu.
  • Click the Save button.
    Add Parameter 3

Remove

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set Remove in the Parameter Name field.
  • Select Text String from the Parameter Type dropdown menu.
  • Click the Save button.
    Add Parameter 6

RemoveAll

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set RemoveAll in the Parameter Name field.
  • Select Flag from the Parameter Type dropdown menu.
  • Click the Save button.
    Add Parameter 9

Category

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set Category in the Parameter Name field.
  • Select Text String from the Parameter Type dropdown menu.
  • Click the Save button.
    Add Parameter 12

Except

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set Except in the Parameter Name field.
  • Select Text String from the Parameter Type dropdown menu.
  • Click the Save button.
    Add Parameter 15

PUAListSource

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.
Add  Parameter 1

This screen will appear.
Add Parameter 2

  • Set PUAListSource in the Parameter Name field.
  • Select Text String from the Parameter Type dropdown menu.
  • Click the Save button.

Image

Script Editor

Click the Add Row button in the Script Editor section to start creating the script
AddRow

A blank function will appear.
Add Row continued

Row 1: Function: PowerShell Script

Search and select the PowerShell Script function.

Row 1 Image 1

The following function will pop up on the screen:
Row 1 Image 2

Paste in the following PowerShell script and set the Expected time of script execution in seconds to 3600 seconds. Click the Save button.

PowerShell Script

Row 1 Image 3

Row 2: Function: Script Log

Add a new row by clicking the Add Row button.
AddRow

A blank function will appear.
Row 2 Image 2

Search and select the Script Log function.
Row 2 Image 3

Row 2 Image 4

The following function will pop up on the screen:
Row 2 Image 5

In the script log message, simply type %output% and click the Save button
Row 2 Image 6

Click the Save button at the top-right corner of the screen to save the script.
Row 2 Image 8

Completed Script

Row 3 Image 1

Output

  • Script log

Changelog

2025-08-12

  • Added another parameter PuaListSource. Its an Optional source for an alternate PUA list JSON. When provided, the script will use the specified local JSON file or downloadable URL instead of the default PUA list.
  • Updated powershell to use this new parameter and as per our new cwrmm script standards.

2026-04-02

  • Updated the PowerShell used in the script as per our new standards.

2025-05-02

  • Fixed the bug where the script contained several outdated and potentially incorrect AppxPackage IDs in the bloatware removal arrays. Some Microsoft apps have changed their package identifiers in newer Windows versions, and some third-party apps may have incorrect publisher IDs.

2025-04-01

  • Initial version of the document