Batch File Help

Discussion in 'Windows 10' started by Shonk, Jun 19, 2020.

  1. Shonk

    Shonk MDL Member

    Oct 10, 2007
    133
    88
    10
    I use a script to remove apps whenever i do a fresh install like so

    Bulk Apps Remove.cmd
    Code:
    rem *** Remove Apps
    powershell "get-appxpackage -Name Microsoft.Advertising.Xaml                | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Appconnector                | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.WindowsFeedbackHub               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.StorePurchaseApp               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.ZuneVideo               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.ZuneMusic              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.3DBuilder               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.BingWeather               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Getstarted               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Messaging               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MicrosoftOfficeHub               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MicrosoftSolitaireCollection               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Office.OneNote               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.People               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.SkypeApp               | remove-appxpackage"
    powershell "get-appxpackage -Name microsoft.windowscommunicationsapps               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.WindowsMaps               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.OneConnect               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MSPaint               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Microsoft3DViewer              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.GetHelp               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Print3D               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.WindowsSoundRecorder               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Wallet               | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.WindowsCamera               | remove-appxpackage"
    powershell "get-appxpackage -Name A278AB0D.MarchofEmpires              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MinecraftUWP              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MicrosoftSolitaireCollection              | remove-appxpackage"
    powershell "get-appxpackage -Name king.com.CandyCrushSodaSaga              | remove-appxpackage"
    powershell "get-appxpackage -Name 9E2F88E3.Twitter              | remove-appxpackage"
    powershell "get-appxpackage -Name Facebook.Facebook              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.BingNews              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.BingWeather              | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Windows.Photos             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.LanguageExperiencePacken-gb             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.549981C3F5F10             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.MicrosoftStickyNotes             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.DesktopAppInstaller             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.XboxSpeechToTextOverlay             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.Xbox.TCUI             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.XboxGameOverlay             | remove-appxpackage"
    powershell "get-appxpackage -Name Microsoft.XboxGamingOverlay             | remove-appxpackage"
    
    
    powershell "get-appxpackage -AllUsers -Name Microsoft.LanguageExperiencePacken-gb                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Advertising.Xaml                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Appconnector                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.WindowsFeedbackHub               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.StorePurchaseApp               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.ZuneVideo               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.ZuneMusic              | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.3DBuilder               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.BingWeather               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Getstarted               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Messaging               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MicrosoftOfficeHub               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MicrosoftSolitaireCollection               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Office.OneNote               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.People               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.SkypeApp               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name microsoft.windowscommunicationsapps               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.WindowsMaps               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.OneConnect               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MSPaint               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Microsoft3DViewer              | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.GetHelp               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Print3D               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.WindowsSoundRecorder               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Wallet               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Windows.HolographicFirstRun               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.YourPhone               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.ScreenSketch             | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MixedReality.Portal            | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Advertising.Xaml             | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Services.Store.Engagement               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.WindowsCamera               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name A278AB0D.MarchofEmpires               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MinecraftUWP               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MicrosoftSolitaireCollection               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name king.com.CandyCrushSodaSaga               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name 9E2F88E3.Twitter               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Facebook.Facebook               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.BingNews               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.BingWeather               | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Windows.Photos                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.549981C3F5F10                 | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.MicrosoftStickyNotes                 | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.DesktopAppInstaller                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.XboxSpeechToTextOverlay                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.Xbox.TCUI                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.XboxGameOverlay                | remove-appxpackage"
    powershell "get-appxpackage -AllUsers -Name Microsoft.XboxGamingOverlay                | remove-appxpackage"
    


    I would like to add this to the batch file as at the moment i am having to save it in a text file and paste it into powershell

    does anyone know how i can correct the formatting so it works in a batch file

    Bulk Apps Remove.txt
    Code:
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.LanguageExperiencePacken-gb*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Advertising*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Appconnector*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*WindowsFeedbackHub*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.DesktopAppInstaller*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.StorePurchaseApp*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ZuneVideo*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ZuneMusic*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.3DBuilder*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.BingWeather*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Getstarted*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Messaging*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftOfficeHub*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftSolitaireCollection*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Office.OneNote*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.People*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.SkypeApp*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*microsoft.windowscommunicationsapps*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.WindowsMaps*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.OneConnect*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MSPaint*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Microsoft3DViewer*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.GetHelp*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Print3D*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Wallet*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Windows.HolographicFirstRun*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.YourPhone*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ScreenSketch*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MixedReality.Portal *"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Advertising.Xaml*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Services.Store.Engagement*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.549981C3F5F10*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftStickyNotes*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxSpeechToTextOverlay*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Xbox.TCUI*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.DesktopAppInstaller*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxGameOverlay*"} | remove-appxprovisionedpackage –online
    Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxGamingOverlay*"} | remove-appxprovisionedpackage –online
    
     
  2. h412d3y

    h412d3y MDL Novice

    Apr 14, 2013
    2
    1
    0
    You could run a batch file to run a powershell instance and load a .ps1 file:

    i.e.

    Code:
    PowerShell.exe -Command "& '%~dpn0.ps1'"
    
    You may need to raise privileges to admin with
    Code:
    powershell -Command "Start-Process PowerShell -Verb RunAs"
    Not sure why you can't just have the ps1 file run in the first place though?
     
  3. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,402
    2,391
    60
  4. Mavericks Choice

    Mavericks Choice MDL Guru

    Aug 5, 2015
    3,379
    14,075
    120
    I run a combination of scripts from in my UA using setupcomplete.cmd
    eg. I use this to call powershell to remove one drive
    Code:
    PowerShell.exe -windowstyle hidden %SystemRoot%\Setup\Scripts\od.ps1"
     
  5. drew84

    drew84 MDL Expert

    Mar 13, 2014
    1,402
    2,391
    60
    #5 drew84, Jun 20, 2020
    Last edited: Jun 20, 2020
    @Shonk, Using info from OP, have created 3 .BAT files for you; Note: I don't code,
    just simply assemble stuff gleaned from sources. Any corrections or improvements
    will no doubt be forthcoming (from more knowledgeable members here)

    Can see no reason why they SHOULDN'T work though...

    Removed apps should normally be registered in the following key

    [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned]

    In Theory as long as they are present there, Windows should not re-install them
    at any future feature update, hence the addition at the bottom of the script.

    ... best I can do (currently)

    Code:
    @rem *** Remove Apps
    rem ----------------------------------------
    rem 01 - Bulk Apps Remove (Run as ADMIN).bat
    rem ----------------------------------------
    PowerShell -Command "Get-AppxPackage *Microsoft.DesktopAppInstaller* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Advertising.Xaml* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Appconnector* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.StorePurchaseApp* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.ZuneVideo* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.ZuneMusic* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.3DBuilder* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.BingWeather* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Getstarted* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Messaging* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Office.OneNote* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.People* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.SkypeApp* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *microsoft.windowscommunicationsapps* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.WindowsMaps* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.OneConnect* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MSPaint* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Microsoft3DViewer* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.GetHelp* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Print3D* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.WindowsSoundRecorder* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Wallet* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.WindowsCamera* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *A278AB0D.MarchofEmpires* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MinecraftUWP* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *king.com.CandyCrushSodaSaga* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *9E2F88E3.Twitter* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Facebook.Facebook* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.BingNews* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.BingWeather* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Windows.Photos* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.LanguageExperiencePacken-gb* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.549981C3F5F10* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.MicrosoftStickyNotes* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.XboxSpeechToTextOverlay* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.Xbox.TCUI* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.XboxGameOverlay* | Remove-AppxPackage"
    PowerShell -Command "Get-AppxPackage *Microsoft.XboxGamingOverlay* | Remove-AppxPackage"
    
    rem Stop Windows 10 From Reinstalling Removed (Deprovisioned) Apps After a Feature Update
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.StorePurchaseApp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.3DBuilder_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetStarted_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Messaging_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.windowscommunicationsapps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.OneConnect_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MSPaint_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe" /
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.HolographicFirstRun_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.YourPhone_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ScreenSketch_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MixedReality.Portal_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Advertising.Xaml_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Services.Store.Engagement_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.549981C3F5F10_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGamingOverlay_8wekyb3d8bbwe" /f
    Press any Key to Exit
    
    :IsAdmin
    Reg.exe query "HKU\S-1-5-19\Environment"
    If Not %ERRORLEVEL% EQU 0 (
     Cls & Echo You must have administrator rights to continue ...
     Pause & Press any Key to Exit
    )
    Cls
    goto:eof
    

    Code:
    @rem *** Remove Apps
    rem ---------------------------------------------------------------------------------------------
    rem 02 - Bulk Apps Remove [AU] (Run as ADMIN).bat [Used for removing apps from ALL USER Accounts]
    rem ---------------------------------------------------------------------------------------------
    powershell -command "Get-appxpackage -allusers *Microsoft.LanguageExperiencePacken-gb* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Advertising.Xaml* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Appconnector* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.WindowsFeedbackHub* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.StorePurchaseApp* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.ZuneVideo* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.ZuneMusic* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.3DBuilder* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.BingWeather* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Getstarted* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Messaging* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MicrosoftOfficeHub* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Office.OneNote* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.People* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.SkypeApp* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *microsoft.windowscommunicationsapps* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.WindowsMaps* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.OneConnect* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MSPaint* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Microsoft3DViewer* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.GetHelp* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Print3D* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.WindowsSoundRecorder* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Wallet* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Windows.HolographicFirstRun* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.YourPhone* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.ScreenSketch* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MixedReality.Portal            | remove-appxpackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Advertising.Xaml* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Services.Store.Engagement* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.WindowsCamera* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *A278AB0D.MarchofEmpires* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MinecraftUWP* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MicrosoftSolitaireCollection* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *king.com.CandyCrushSodaSaga* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *9E2F88E3.Twitter* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Facebook.Facebook* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.BingNews* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.BingWeather* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Windows.Photos* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.549981C3F5F10 * | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.MicrosoftStickyNotes * | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.DesktopAppInstaller* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.XboxSpeechToTextOverlay* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.Xbox.TCUI* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.XboxGameOverlay* | Remove-AppxPackage"
    powershell -command "Get-appxpackage -allusers *Microsoft.XboxGamingOverlay* | Remove-AppxPackage"
    
    rem Stop Windows 10 From Reinstalling Removed (Deprovisioned) Apps After a Feature Update
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.StorePurchaseApp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.3DBuilder_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetStarted_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Messaging_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.windowscommunicationsapps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.OneConnect_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MSPaint_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe" /
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.HolographicFirstRun_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.YourPhone_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ScreenSketch_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MixedReality.Portal_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Advertising.Xaml_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Services.Store.Engagement_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.549981C3F5F10_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGamingOverlay_8wekyb3d8bbwe" /f
    Press any Key to Exit
    
    :IsAdmin
    Reg.exe query "HKU\S-1-5-19\Environment"
    If Not %ERRORLEVEL% EQU 0 (
     Cls & Echo You must have administrator rights to continue ...
     Pause & Press any Key to Exit
    )
    Cls
    goto:eof
    

    Code:
    @rem *** Remove Apps
    rem ------------------------------------------------------------------------------------------------------------------------
    rem 03 - Bulk Apps Remove [NA] (Run as ADMIN).bat [Used for removing apps from NEW accounts CREATED AFTER running the above]
    rem ------------------------------------------------------------------------------------------------------------------------
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.LanguageExperiencePacken-gb*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Advertising*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Appconnector*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*WindowsFeedbackHub*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.DesktopAppInstaller*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.StorePurchaseApp*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ZuneVideo*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ZuneMusic*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.3DBuilder*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.BingWeather*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Getstarted*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Messaging*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftOfficeHub*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftSolitaireCollection*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Office.OneNote*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.People*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.SkypeApp*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*microsoft.windowscommunicationsapps*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.WindowsMaps*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.OneConnect*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MSPaint*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Microsoft3DViewer*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.GetHelp*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Print3D*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Wallet*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Windows.HolographicFirstRun*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.YourPhone*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.ScreenSketch*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MixedReality.Portal*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Advertising.Xaml*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Services.Store.Engagement*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.549981C3F5F10*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.MicrosoftStickyNotes*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxSpeechToTextOverlay*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.Xbox.TCUI*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxGameOverlay*"} | remove-appxprovisionedpackage –online"
    powershell -command "Get-appxprovisionedpackage –online | where-object {$_.packagename –like "*Microsoft.XboxGamingOverlay*"} | remove-appxprovisionedpackage –online"
    
    rem Stop Windows 10 From Reinstalling Removed (Deprovisioned) Apps After a Feature Update
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.StorePurchaseApp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneVideo_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ZuneMusic_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.3DBuilder_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetStarted_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Messaging_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Office.OneNote_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.People_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.SkypeApp_kzf8qxf38zg5c" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\microsoft.windowscommunicationsapps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.WindowsMaps_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.OneConnect_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MSPaint_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Print3D_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Wallet_8wekyb3d8bbwe" /
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Windows.HolographicFirstRun_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.YourPhone_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.ScreenSketch_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MixedReality.Portal_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Advertising.Xaml_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Services.Store.Engagement_8wekyb3d8bbwe" /ff
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.549981C3F5F10_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Xbox.TCUI_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGameOverlay_8wekyb3d8bbwe" /f
    Reg Add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.XboxGamingOverlay_8wekyb3d8bbwe" /f
    Press any Key to Exit
    
    :IsAdmin
    Reg.exe query "HKU\S-1-5-19\Environment"
    If Not %ERRORLEVEL% EQU 0 (
     Cls & Echo You must have administrator rights to continue ...
     Pause & Press any Key to Exit
    )
    Cls
    goto:eof
    

    For Future Reference:
    Clean and Proper way to Prevent Inbox Apps from being deployed (Registered)
    Credit @abbodi1406
     
  6. Mr Been

    Mr Been MDL Senior Member

    Feb 24, 2008
    262
    70
    10
    #6 Mr Been, Jun 21, 2020
    Last edited: Jun 21, 2020
    @Shonk

    have a look at this powershell script. I got it from here but don't know who published it?
    I do so too, with this script .....

    Code:
    powershell.exe set-ExecutionPolicy unrestricted
    # Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
    Write-Host "`n****************************"
    write-host "`n   Continue?    ( Y / N )   " -ForegroundColor Yellow -BackgroundColor Black
    Write-Host "`n****************************"
    $response = read-host
    if ( $response -ne "Y" ) { exit }
    
    # $Shell = New-Object -ComObject "WScript.Shell"
    # $Button = $Shell.Popup("Click [ OK ] to continue.", 0, "ATTENTION", 0)
    
    # read-host "Press ENTER to continue .........."
    
    # This final command will remove universal Apps from all accounts currently created on your PC:
    Get-AppxPackage -AllUsers | Remove-AppxPackage
    # You will enter the following command to remove all Apps from your system account:
    Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage –online
    # This final command will remove universal Apps from all accounts currently created on your PC:
    Get-AppxPackage -AllUsers | Remove-AppxPackage
    
    Add-Content c:\Success.txt "20-Successful removal of Win10 Apps-PS1"
    
    Write-Host "*************************************************"
    Write-Host "*  All Win10 Applications removed successfully  *"
    Write-Host "*************************************************"
    
    Read-Host -Prompt "Press Enter to continue ..."