Use following commands in a powershell admin console or script with admin rights:
- to uninstall all built-in apps for all user accounts:
Get-AppxPackage -AllUsers | Remove-AppxPackage
- to prevent apps from installing for new users we need to remove Provisioned Packages:
Import-Module Appx
Import-Module Dism
Get-AppXProvisionedPackage -online | Remove-AppxProvisionedPackage -online
*Note 1
Run the following command to allow scripts to run.
Set-ExecutionPolicy Unrestricted
After you have finished set it back using the below command.
Set-ExecutionPolicy Restricted