Remove annoying AppX (Windows Store) applications
This commit is contained in:
parent
b970d95f1b
commit
431a514281
22
badAppXPackages.yaml
Normal file
22
badAppXPackages.yaml
Normal 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
28
removeAppXPackages.sls
Normal 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 %}
|
Loading…
Reference in New Issue
Block a user