Remove annoying AppX (Windows Store) applications

This commit is contained in:
Adam Goldsmith 2022-10-05 14:39:26 -04:00
parent b970d95f1b
commit 431a514281
3 changed files with 51 additions and 0 deletions

22
badAppXPackages.yaml Normal file
View File

@ -0,0 +1,22 @@
- DellPrinter.DellDocumentHub
- Microsoft.Getstarted
- Microsoft.MicrosoftOfficeHub
- Microsoft.MicrosoftSolitaireCollection
- Microsoft.Office.OneNote
- Microsoft.SkypeApp
- Microsoft.Wallet
- Microsoft.Xbox.TCUI
- Microsoft.XboxApp
- Microsoft.XboxGameOverlay
- Microsoft.XboxGamingOverlay
#- Microsoft.XboxIdentityProvider
- Microsoft.XboxSpeechToTextOverlay
- Microsoft.YourPhone
- Microsoft.ZuneMusic
- Microsoft.ZuneVideo
- Microsoft.People
#- microsoft.windowscommunicationsapps
- Microsoft.OneConnect
- Microsoft.Messaging
- king.com.FarmHeroesSaga
- king.com.CandyCrushFriends

28
removeAppXPackages.sls Normal file
View File

@ -0,0 +1,28 @@
{% import_yaml "badAppXPackages.yaml" as packages %}
{#
# {% for pkg in packages %}
# Remove {{ pkg }}:
# cmd.run:
# - names:
# - Get-AppxPackage -AllUsers {{pkg}} | Remove-AppxPackage
# - Get-AppxProvisionedPackage -Online | where-object DisplayName -eq "{{pkg}}" | Remove-AppxProvisionedPackage -Online
# - shell: powershell
# {% endfor %}
#}
{% set installed_packages = salt['cmd.powershell']('(Get-AppxPackage -AllUsers).Name') %}
{% for pkg in packages|intersect(installed_packages) %}
Remove {{ pkg }}:
cmd.run:
- name: Get-AppxPackage -AllUsers {{pkg}} | Remove-AppxPackage
- shell: powershell
{% endfor %}
{% set provisioned_packages = salt['cmd.powershell']('(Get-AppxProvisionedPackage -Online).DisplayName') %}
{% for pkg in packages|intersect(provisioned_packages) %}
Remove provisioned {{ pkg }}:
cmd.run:
- name: Get-AppxProvisionedPackage -Online | where-object DisplayName -eq "{{pkg}}" | Remove-AppxProvisionedPackage -Online
- shell: powershell
{% endfor %}

View File

@ -22,4 +22,5 @@ base:
- printers
- chocolatey-packages
- removeShortcuts
- removeAppXPackages
- update-fusion360