Remove MS Store with Powershell task
Kinda at a stoppage with trying to disable windows store on a set up laptops. I have tried to run this as a task after making sure execution policy was set correctly Get-AppxPackage windowsstore | Remove-AppxPackage I have tried copying a ps1 file and calling powershell to open the file I have tried compiling Get-AppxPackage windowsstore | Remove-AppxPackage into an EXE and calling CMD to open it. All the tasks complete but the store remains. I can goto on of the computers and manually run the exe or the PS CMD and it removes the store. Not sure whats going on but whatever the cause it's very frustrating.
Comments
Check your Run As in your deployment settings. Window Apps will install for each unique user and any new unique users on the machine. If you run a script to uninstall or manually uninstall, it will always come back when a new unique user signs into the computer.
As to why it is not removing. If you have the Run As set to deploy user, then it is only removing from the user with deploy access. Switching to Logged on user will uninstall to the current logged on user.
References:
https://www.pdq.com/blog/remove-appx-packages/
https://www.pdq.com/blog/removing-windows-10-apps-and-advertising/
https://support.pdq.com/knowledge-base/1353
For win 8.1 I have one deploy package with 3 powershell steps, working in domain for all users, old and new (not run as logged on user)
Step 1 - Remove All Metro Apps
Step 2 - Block access to MS Store
Step 3 - Block WinStore Auto Download