I am trying to get a winget task to run in Bigfix and it is not working. I did find that winget will not run as system. Now I am trying to run it as current user.
override wait
runas=currentuser
wait cmd.exe /c winget uninstall “windows web experience pack”
Wow! That is a very complex powershell script. It is interesting that the script can make winget run as system. I was thinking it would be very simple to remove Web Experience with Bigfix, but it is not turning out to be simple.
For a one liner, this powershell command seems to work when running as system, but I have not done much testing.
I found from the author of the Winget-InstallPackage.ps1 script, that it does not work for the “Windows Web Experience Pack”. He said to use remove-appxpackage.
But then, if you want to add “Windows Web Experience Pack” back after removing it, it will not run under system context.