Link to home
Start Free TrialLog in
Avatar of Encinitas
Encinitas

asked on

script is not removing the apps for all users.

Created a script to remove apps for all users but it only removes apps for the user logged in. Im doing all this on a VM. Im trying to create an image without all unnecessary apps. Im not sure what im missing. I have attached the script im using.Win10-App-uninstall-final.txt
Avatar of McKnife
McKnife
Flag of Germany image

So who runs that script, does it run elevated? Not anyone may remove apps for all users.
https://jkindon.com/2018/03/20/windows-10-start-menu-declutter-the-default/ gives you ideas how people do it.
try this

Get-AppxPackage -AllUsers | where-object {$_.name –notlike “*store*” -And $_.name –notlike “*calc*” -And $_.name –notlike “*Sticky*”} | Remove-AppxPackage -ErrorAction SilentlyContinue

Get-appxprovisionedpackage –online | where-object {$_.DisplayName –notlike “*store*” -And $_.DisplayName –notlike “*calc*” -And $_.DisplayName –notlike “*Sticky*”}  | Remove-AppxProvisionedPackage -online -ErrorAction SilentlyContinue

make sure to change the apps you need
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.