You can use this PowerShell ISE script to remove pre-installed bloatware. It's pretty useful for purging new Virtual Machines of garbage in Start Menu.
I have been planning on creating some kind of PoC of PowerShell debloating script. This specific script could have been just a simple PS script, but I wanted to try my chances at creating a very simple PS GUI.
It took me 5 hours of work and 2 years of procrastination
It's basically a kind of GUI handling an array with names of packages that hide in the OS. It could be any kind of useless app, e.g. Instagram, Candy Crush, Solitaire.
You may add the packages you want into the list.txt, then just run the script and remove them through PowerShell commands. Comment out the ones which shouldn't be removed.
When creating new user profile Windows copies installed app packages into new user accounts. It is the best to use this script before creating new accounts
Adding a non-GUI version. I had one lying around, but I will rework it and attach it later.
- Open PowerShell ISE in administrator mode, paste the code, select all, run the code.
Run the script as PowerShell script with admin rights.-
This would work, but I need to implement interpret recognition conditionals. PowerShell ISE can't use the same path variables as normal PowerShell it seems.
By default PowerShell execution policy is disabled, change it with:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
It's advised to restrict the execution policy after finishing your job. For more info visit: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-executionpolicy?view=powershell-7.2
-
Get-AppxPackage -AllUsers | Select Name
Selects packages from locally installed packages
Get-AppXProvisionedPackage -Online | Select DisplayName
Selects packages from packages provisioned for new user accounts.
graph LR
a[Get-AppxPackage -AllUsers]-->b
b[Learn the list of installed bloatware packages]-->c
c[Add new package names to the list]-->d
d[Enjoy bloatware free experience]