Windows 10 removing embedded apps via PowerShell

I want to delete on several PCs, built-in Windows 10 applications via PowerShell, I found the commands

DISM /Online /Get-ProvisionedAppxPackages | select-string Packagename

DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub_18.2002.1101.0_neutral_~_8wekyb3d8bbwe

And everything works, but only while you delete from one PC, on the second if the version is different, then an error occurs. I was thinking of using a " * " sign like -

DISM /Online /Remove-ProvisionedAppxPackage /PackageName:Microsoft.MicrosoftOfficeHub*

However, it doesn't work.

Can you tell me how to unify the delete command so that it can be deleted regardless of the version?

Author: Victor, 2020-03-11

1 answers

There is a great project Win10 Initial Setup Script. A set of settings for tuning a particular part of Windows 10.

What makes the project cool

  • Not interactivity. We write the necessary functions in our script and it twitches. Fuck the mouse and Visual Basic with sendkey.
  • For each function, there is an opposite one that returns "all back". This is even spelled out in the rules for adding new features. If you want to finish off your super-cool tuning-do it and rollback for her.
  • Still developing. An important point, because you do not need to accompany and menyteynirit yourself.

What's wrong with the project

  • Not interactivity. We write the necessary functions in our script and it twitches. There are no 3d mazes that you need to fly on a spaceship to cut off the autorun.
  • There is no idempotence. If we integrate with ansible, it will always be changed.
  • There is no support for windows 7. Some common registry branches will certainly change, but still.

Now specifically on the problem of embedded prog. There is a function called UninstallMsftBloat. Accordingly, according to the documentation, it is necessary to write:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File Win10.ps1 -include Win10.psm1 UninstallMsftBloat
 1
Author: don Rumata, 2020-03-11 21:11:14